organize
This commit is contained in:
@@ -7,7 +7,7 @@ in {
|
|||||||
nixos = { config, pkgs, lib, ... }: {
|
nixos = { config, pkgs, lib, ... }: {
|
||||||
options.den.tunnels = lib.mkOption {
|
options.den.tunnels = lib.mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
description = "Cloudflared tunnel subdomains, matched directly against portmap keys.";
|
description = "cloudflared tunnels";
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
42
modules/core/infra/syncthing.nix
Normal file
42
modules/core/infra/syncthing.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
den.aspects.syncthing = {
|
||||||
|
homeManager = let
|
||||||
|
devices = ["desktop" "laptop" "server"];
|
||||||
|
|
||||||
|
mkFolder = path: {
|
||||||
|
inherit path;
|
||||||
|
devices = devices;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
|
||||||
|
key = "/home/bug/.syncthing/key.pem";
|
||||||
|
cert = "/home/bug/.syncthing/cert.pem";
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
devices = {
|
||||||
|
desktop.id = "VEZXY3W-U6UXWTP-6BHANIG-O5EKNZY-XNV5YOX-4V4O3HB-ETECIUX-T2DK7AV";
|
||||||
|
laptop.id = "I6NW53P-IJMMT73-7O53TXY-3GAHS2U-4EAADM7-ZNB5ZPB-62QHKVW-H7DYXQ2";
|
||||||
|
server.id = "KJECAIP-Y2Y3FHV-NOJKIQV-LWIDMMZ-5ITEAZ4-LQCQL72-3BGW6T7-BFPFJQA";
|
||||||
|
};
|
||||||
|
|
||||||
|
folders = {
|
||||||
|
"Documents" = mkFolder "/home/bug/Documents";
|
||||||
|
"Downloads" = mkFolder "/home/bug/Downloads";
|
||||||
|
"Pictures" = mkFolder "/home/bug/Pictures";
|
||||||
|
"Videos" = mkFolder "/home/bug/Videos";
|
||||||
|
"Music" = mkFolder "/home/bug/Music";
|
||||||
|
"nix" = mkFolder "/home/bug/nix";
|
||||||
|
"hytale" = mkFolder "/home/bug/.local/share/Hytale/UserData/Saves";
|
||||||
|
"ssh" = mkFolder "/home/bug/.ssh";
|
||||||
|
"cloudflared" = mkFolder "/home/bug/.cloudflared";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,17 +2,8 @@
|
|||||||
den.aspects.box = {
|
den.aspects.box = {
|
||||||
includes = with den.aspects; [
|
includes = with den.aspects; [
|
||||||
den.default
|
den.default
|
||||||
den.provides.home-manager
|
|
||||||
|
|
||||||
dns
|
|
||||||
openssh
|
|
||||||
|
|
||||||
cloudflared
|
cloudflared
|
||||||
syncthing
|
|
||||||
|
|
||||||
catppuccin
|
|
||||||
|
|
||||||
fish
|
|
||||||
|
|
||||||
portmap
|
portmap
|
||||||
searxng
|
searxng
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
{ den, ... }:
|
{ den, ... }: {
|
||||||
{
|
den.aspects.common = {
|
||||||
den.aspects.nix = {
|
|
||||||
includes = with den.aspects; [
|
includes = with den.aspects; [
|
||||||
den.default
|
den.default
|
||||||
den.provides.home-manager
|
|
||||||
|
|
||||||
nvidia
|
|
||||||
|
|
||||||
cosmic
|
cosmic
|
||||||
audio
|
audio
|
||||||
@@ -13,19 +9,10 @@
|
|||||||
swap
|
swap
|
||||||
virtualisation
|
virtualisation
|
||||||
|
|
||||||
dns
|
|
||||||
openssh
|
|
||||||
# cloudflare-warp
|
|
||||||
|
|
||||||
syncthing
|
|
||||||
|
|
||||||
stylix
|
stylix
|
||||||
catppuccin
|
|
||||||
|
|
||||||
fish
|
|
||||||
flatpak
|
flatpak
|
||||||
development
|
development
|
||||||
# cad
|
|
||||||
compatibility
|
compatibility
|
||||||
utilities
|
utilities
|
||||||
|
|
||||||
@@ -36,9 +23,5 @@
|
|||||||
social
|
social
|
||||||
gaming
|
gaming
|
||||||
];
|
];
|
||||||
|
|
||||||
nixos = {
|
|
||||||
networking.hostName = "nix";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,21 @@
|
|||||||
{ den, ... }: {
|
{ den, ... }: {
|
||||||
den.default = {
|
den.default = {
|
||||||
includes = with den.aspects; [
|
includes = with den.aspects; [
|
||||||
|
den.provides.home-manager
|
||||||
|
|
||||||
boot
|
boot
|
||||||
security
|
security
|
||||||
locale
|
locale
|
||||||
essentials
|
essentials
|
||||||
|
|
||||||
|
dns
|
||||||
|
openssh
|
||||||
|
syncthing
|
||||||
|
|
||||||
|
catppuccin
|
||||||
|
fish
|
||||||
|
|
||||||
|
janitor
|
||||||
];
|
];
|
||||||
|
|
||||||
nixos = { ... }: {
|
nixos = { ... }: {
|
||||||
|
|||||||
20
modules/hosts/laptop.nix
Normal file
20
modules/hosts/laptop.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ den, ... }: {
|
||||||
|
den.aspects.laptop = {
|
||||||
|
includes = with den.aspects; [
|
||||||
|
common
|
||||||
|
|
||||||
|
amdgpu
|
||||||
|
cloudflare-warp
|
||||||
|
cad
|
||||||
|
];
|
||||||
|
|
||||||
|
nixos = {
|
||||||
|
networking.hostName = "nix";
|
||||||
|
|
||||||
|
services.logind.settings.Login = {
|
||||||
|
HandleLidSwitch = "ignore";
|
||||||
|
HandleLidSwitchDocked = "ignore";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{ den, ... }: {
|
|
||||||
den.aspects.laptop = {
|
|
||||||
includes = with den.aspects; [
|
|
||||||
den.default
|
|
||||||
den.provides.home-manager
|
|
||||||
|
|
||||||
amdgpu
|
|
||||||
|
|
||||||
cosmic
|
|
||||||
audio
|
|
||||||
|
|
||||||
swap
|
|
||||||
virtualisation
|
|
||||||
|
|
||||||
dns
|
|
||||||
openssh
|
|
||||||
cloudflare-warp
|
|
||||||
|
|
||||||
syncthing
|
|
||||||
|
|
||||||
stylix
|
|
||||||
catppuccin
|
|
||||||
|
|
||||||
fish
|
|
||||||
flatpak
|
|
||||||
development
|
|
||||||
cad
|
|
||||||
compatibility
|
|
||||||
utilities
|
|
||||||
janitor
|
|
||||||
|
|
||||||
firefox
|
|
||||||
librewolf
|
|
||||||
|
|
||||||
music
|
|
||||||
social
|
|
||||||
gaming
|
|
||||||
];
|
|
||||||
|
|
||||||
nixos = {
|
|
||||||
networking.hostName = "nix";
|
|
||||||
|
|
||||||
services.logind.settings.Login = {
|
|
||||||
HandleLidSwitch = "ignore";
|
|
||||||
HandleLidSwitchDocked = "ignore";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
13
modules/hosts/nix.nix
Normal file
13
modules/hosts/nix.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ den, ... }: {
|
||||||
|
den.aspects.nix = {
|
||||||
|
includes = with den.aspects; [
|
||||||
|
common
|
||||||
|
|
||||||
|
nvidia
|
||||||
|
];
|
||||||
|
|
||||||
|
nixos = {
|
||||||
|
networking.hostName = "nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
{
|
|
||||||
den.aspects.syncthing = {
|
|
||||||
homeManager = {
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
overrideDevices = true;
|
|
||||||
overrideFolders = true;
|
|
||||||
|
|
||||||
key = "/home/bug/.syncthing/key.pem";
|
|
||||||
cert = "/home/bug/.syncthing/cert.pem";
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
devices = {
|
|
||||||
desktop.id = "VEZXY3W-U6UXWTP-6BHANIG-O5EKNZY-XNV5YOX-4V4O3HB-ETECIUX-T2DK7AV";
|
|
||||||
laptop.id = "I6NW53P-IJMMT73-7O53TXY-3GAHS2U-4EAADM7-ZNB5ZPB-62QHKVW-H7DYXQ2";
|
|
||||||
server.id = "KJECAIP-Y2Y3FHV-NOJKIQV-LWIDMMZ-5ITEAZ4-LQCQL72-3BGW6T7-BFPFJQA";
|
|
||||||
};
|
|
||||||
|
|
||||||
folders = {
|
|
||||||
"Documents" = {
|
|
||||||
path = "/home/bug/Documents";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Downloads" = {
|
|
||||||
path = "/home/bug/Downloads";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Pictures" = {
|
|
||||||
path = "/home/bug/Pictures";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Videos" = {
|
|
||||||
path = "/home/bug/Videos";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"nix" = {
|
|
||||||
path = "/home/bug/nix";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"hytale" = {
|
|
||||||
path = "/home/bug/.local/share/Hytale/UserData/Saves";
|
|
||||||
devices = ["desktop" "laptop"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"ssh" = {
|
|
||||||
path = "/home/bug/.ssh";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"cloudflared" = {
|
|
||||||
path = "/home/bug/.cloudflared";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Music" = {
|
|
||||||
path = "/home/bug/Music/";
|
|
||||||
devices = ["desktop" "laptop" "server"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
{ lib, ... }: {
|
{
|
||||||
den.aspects.portmap.nixos.options.den.portmap = lib.mkOption {
|
den.aspects.portmap.nixos.options.den.portmap = {
|
||||||
type = lib.types.attrsOf lib.types.port;
|
tvtun = 3001;
|
||||||
readOnly = true;
|
search = 8888;
|
||||||
default = import ../../../portmap.nix;
|
files = 3210;
|
||||||
|
tube = 3030;
|
||||||
|
reddit = 8975;
|
||||||
|
git = 3002;
|
||||||
|
monitor = 61208;
|
||||||
|
matrix = 8008;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
address = "127.0.0.1";
|
address = "127.0.0.1";
|
||||||
port = config.den.portmap.reddit;
|
port = config.den.portmap.reddit;
|
||||||
openFirewall = false;
|
openFirewall = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
SFW_ONLY = "off";
|
SFW_ONLY = "off";
|
||||||
|
|||||||
10
portmap.nix
10
portmap.nix
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
tvtun = 3001;
|
|
||||||
search = 8888;
|
|
||||||
files = 3210;
|
|
||||||
tube = 3030;
|
|
||||||
reddit = 8975;
|
|
||||||
git = 3002;
|
|
||||||
monitor = 61208;
|
|
||||||
matrix = 8008;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user