diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix index f300185..788a46b 100644 --- a/configurations/nixos/defiant/configuration.nix +++ b/configurations/nixos/defiant/configuration.nix @@ -121,6 +121,7 @@ sync = { enable = true; folders = { + share.enable = true; leyla = { documents.enable = true; calendar.enable = true; diff --git a/modules/nixos-modules/sync.nix b/modules/nixos-modules/sync.nix index 402d580..b067bfb 100644 --- a/modules/nixos-modules/sync.nix +++ b/modules/nixos-modules/sync.nix @@ -8,6 +8,9 @@ in { options.host.sync = { enable = lib.mkEnableOption "should sync thing be enabled on this device"; folders = { + share = { + enable = lib.mkEnableOption "should the share folder by synced"; + }; leyla = { documents = { enable = lib.mkEnableOption "should the documents folder be synced"; @@ -72,14 +75,24 @@ in { horizon = lib.mkIf (config.networking.hostName != "horizon") { id = "OGPAEU6-5UR56VL-SP7YC4Y-IMVCRTO-XFD4CYN-Z6T5TZO-PFZNAT6-4MKWPQS"; }; + shale = { + id = "AOAXEVD-QJ2IVRA-6G44Q7Q-TGUPXU2-FWWKOBH-DPKWC5N-LBAEHWJ-7EQF4AM"; + }; }; folders = let - allDevices = [ - "ceder" - "coven" - (lib.mkIf (config.networking.hostName != "defiant") "defiant") - (lib.mkIf (config.networking.hostName != "twilight") "twilight") - (lib.mkIf (config.networking.hostName != "horizon") "horizon") + ceder = "ceder"; + coven = "coven"; + shale = "shale"; + defiant = lib.mkIf (config.networking.hostName != "defiant") "defiant"; + twilight = lib.mkIf (config.networking.hostName != "twilight") "twilight"; + horizon = lib.mkIf (config.networking.hostName != "horizon") "horizon"; + leylaDevices = [ + ceder + coven + shale + defiant + twilight + horizon ]; in lib.mkMerge [ @@ -88,21 +101,32 @@ in { "documents" = { id = "hvrj0-9bm1p"; path = "${mountDir}/leyla/documents"; - devices = allDevices; + devices = leylaDevices; }; }) (lib.mkIf config.host.sync.folders.leyla.calendar.enable { "calendar" = { id = "8oatl-1rv6w"; path = "${mountDir}/leyla/calendar"; - devices = allDevices; + devices = leylaDevices; }; }) (lib.mkIf config.host.sync.folders.leyla.notes.enable { "notes" = { id = "dwbuv-zffnf"; path = "${mountDir}/leyla/notes"; - devices = allDevices; + devices = leylaDevices; + }; + }) + (lib.mkIf config.host.sync.folders.share.enable { + "share" = { + id = "73ot0-cxmkx"; + path = "${mountDir}/default/share"; + devices = [ + ceder + shale + defiant + ]; }; }) ];