diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix index 9d61f65..7e46330 100644 --- a/configurations/nixos/defiant/configuration.nix +++ b/configurations/nixos/defiant/configuration.nix @@ -120,6 +120,13 @@ }; sync = { enable = true; + devices = { + ceder.autoAcceptFolders = true; + coven.autoAcceptFolders = true; + twilight.autoAcceptFolders = true; + horizon.autoAcceptFolders = true; + shale.autoAcceptFolders = true; + }; folders = { share = { enable = true; diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix index 8a26487..05c1b50 100644 --- a/configurations/nixos/horizon/configuration.nix +++ b/configurations/nixos/horizon/configuration.nix @@ -19,6 +19,11 @@ }; sync = { enable = true; + devices = { + ceder.autoAcceptFolders = true; + coven.autoAcceptFolders = true; + twilight.autoAcceptFolders = true; + }; folders = { share.enable = true; leyla = { diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix index 555eb05..7f5d01b 100644 --- a/configurations/nixos/twilight/configuration.nix +++ b/configurations/nixos/twilight/configuration.nix @@ -31,6 +31,11 @@ }; sync = { enable = true; + devices = { + ceder.autoAcceptFolders = true; + coven.autoAcceptFolders = true; + horizon.autoAcceptFolders = true; + }; folders = { share.enable = true; leyla = { diff --git a/modules/nixos-modules/sync.nix b/modules/nixos-modules/sync.nix index 48fd2c3..f4bfbfc 100644 --- a/modules/nixos-modules/sync.nix +++ b/modules/nixos-modules/sync.nix @@ -7,6 +7,23 @@ in { options.host.sync = { enable = lib.mkEnableOption "should sync thing be enabled on this device"; + devices = { + ceder = { + autoAcceptFolders = lib.mkEnableOption "should sync thing auto accept folders from ceder"; + }; + coven = { + autoAcceptFolders = lib.mkEnableOption "should sync thing auto accept folders from coven"; + }; + twilight = { + autoAcceptFolders = lib.mkEnableOption "should sync thing auto accept folders from twilight"; + }; + horizon = { + autoAcceptFolders = lib.mkEnableOption "should sync thing auto accept folders from horizon"; + }; + shale = { + autoAcceptFolders = lib.mkEnableOption "should sync thing auto accept folders from shale"; + }; + }; folders = { share = { enable = lib.mkEnableOption "should the share folder by synced"; @@ -62,21 +79,26 @@ in { devices = { ceder = { id = "MGXUJBS-7AENXHB-7YQRNWG-QILKEJD-5462U2E-WAQW4R4-I2TVK5H-SMK6LAA"; + autoAcceptFolders = config.host.sync.devices.ceder.autoAcceptFolders; }; coven = { id = "QGU7NN6-OMXTWVA-YCZ73S5-2O7ECTS-MUCTN4M-YH6WLEL-U4U577I-7PBNCA5"; + autoAcceptFolders = config.host.sync.devices.coven.autoAcceptFolders; }; defiant = lib.mkIf (config.networking.hostName != "defiant") { id = "TQGGO5F-PUXQYVV-LVVM7PR-Q4TKI6T-NR576PH-CFTVB4O-RP5LL6C-WKQMXQR"; }; twilight = lib.mkIf (config.networking.hostName != "twilight") { id = "UDIYL7V-OAZ2BI3-EJRAWFB-GZYVDWR-JNUYW3F-FFQ35MU-XBTGWEF-QD6K6QN"; + autoAcceptFolders = config.host.sync.devices.twilight.autoAcceptFolders; }; horizon = lib.mkIf (config.networking.hostName != "horizon") { id = "OGPAEU6-5UR56VL-SP7YC4Y-IMVCRTO-XFD4CYN-Z6T5TZO-PFZNAT6-4MKWPQS"; + autoAcceptFolders = config.host.sync.devices.horizon.autoAcceptFolders; }; shale = { id = "AOAXEVD-QJ2IVRA-6G44Q7Q-TGUPXU2-FWWKOBH-DPKWC5N-LBAEHWJ-7EQF4AM"; + autoAcceptFolders = config.host.sync.devices.shale.autoAcceptFolders; }; }; folders = let