modularize config
This commit is contained in:
parent
48f0c3b3ec
commit
65ff3fcd11
25 changed files with 88 additions and 14 deletions
|
@ -76,7 +76,7 @@
|
|||
attrs.stylix.nixosModules.stylix
|
||||
attrs.nixvim.nixosModules.nixvim
|
||||
attrs.nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||
./hosts
|
||||
./hosts/Lenni
|
||||
./users/willifan
|
||||
./pkgs
|
||||
];
|
||||
|
@ -107,7 +107,7 @@
|
|||
attrs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||
./hosts
|
||||
./hosts/Puenktchen
|
||||
./users/willifan
|
||||
./pkgs
|
||||
];
|
||||
|
@ -138,7 +138,7 @@
|
|||
attrs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||
./hosts
|
||||
./hosts/Anton
|
||||
./users/willifan
|
||||
./pkgs
|
||||
];
|
||||
|
@ -167,7 +167,7 @@
|
|||
attrs.stylix.nixosModules.stylix
|
||||
attrs.nixvim.nixosModules.nixvim
|
||||
attrs.jovian.nixosModules.default
|
||||
./hosts
|
||||
./hosts/Lillie
|
||||
./users/willifan
|
||||
./pkgs
|
||||
];
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
./radicale.nix
|
||||
./syncthing.nix
|
||||
|
||||
../../modules/common
|
||||
../../modules/server
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -4,5 +4,8 @@
|
|||
./hardware-configuration.nix
|
||||
#./disko.nix
|
||||
./syncthing.nix
|
||||
|
||||
../../modules/common
|
||||
../../modules/desktop
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,5 +3,9 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disko.nix
|
||||
|
||||
../../modules/common
|
||||
../../modules/desktop
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disko.nix
|
||||
./syncthing.nix
|
||||
|
||||
../../modules/common
|
||||
../../modules/desktop
|
||||
|
||||
];
|
||||
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ hostname, type, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common
|
||||
./${type}
|
||||
./${hostname}
|
||||
];
|
||||
}
|
70
modules/common/syncthing.nix
Normal file
70
modules/common/syncthing.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
syncthing.devices = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
options = {
|
||||
|
||||
id = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "willifan";
|
||||
dataDir = "/mnt/data";
|
||||
configDir = "/mnt/data/.config/syncthing";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
gui = {
|
||||
user = "willifan";
|
||||
password = "temppassword";
|
||||
};
|
||||
devices = {
|
||||
Anton = { id = "WCDBADD-UPKCACI-X2YJOIO-5QC44PL-DBCR6TS-ADVQV33-HSMF32O-FOKMKAU"; };
|
||||
};
|
||||
folders = {
|
||||
"Documents" = {
|
||||
id = "jtl6g-qjmwo";
|
||||
path = "/mnt/data/Documents";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Enpass" = {
|
||||
id = "ciksm-xsw4m";
|
||||
path = "/mnt/data/Enpass";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Pictures" = {
|
||||
id = "po4qj-q9t0t";
|
||||
path = "/mnt/data/Pictures";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Videos" = {
|
||||
id = "4wqf5-xasng";
|
||||
path = "/mnt/data/Videos";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Notes" = {
|
||||
id = "oc61n-iewgj";
|
||||
path = "/mnt/data/Notes";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Music" = {
|
||||
id = "xxh8a-3y2tq";
|
||||
path = "/mnt/data/Music";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue