From a7c734871b15b2baccc7503cfa07ed5ebf4fc154 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Mon, 24 Feb 2025 18:48:06 -0600 Subject: [PATCH] fixed shares between devices --- .../nixos/defiant/configuration.nix | 6 +- .../nixos/horizon/configuration.nix | 2 - .../nixos/twilight/configuration.nix | 2 - modules/nixos-modules/sync.nix | 58 +++++++++---------- 4 files changed, 33 insertions(+), 35 deletions(-) diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix index 788a46b..6394e77 100644 --- a/configurations/nixos/defiant/configuration.nix +++ b/configurations/nixos/defiant/configuration.nix @@ -121,10 +121,12 @@ sync = { enable = true; folders = { - share.enable = true; + share = { + enable = true; + calendar.enable = true; + }; leyla = { documents.enable = true; - calendar.enable = true; notes.enable = true; }; }; diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix index 1dc88b7..822d80a 100644 --- a/configurations/nixos/horizon/configuration.nix +++ b/configurations/nixos/horizon/configuration.nix @@ -22,8 +22,6 @@ folders = { leyla = { documents.enable = true; - calendar.enable = true; - notes.enable = true; }; }; }; diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix index 46dfd8a..0a75713 100644 --- a/configurations/nixos/twilight/configuration.nix +++ b/configurations/nixos/twilight/configuration.nix @@ -34,8 +34,6 @@ folders = { leyla = { documents.enable = true; - calendar.enable = true; - notes.enable = true; }; }; }; diff --git a/modules/nixos-modules/sync.nix b/modules/nixos-modules/sync.nix index 72795aa..94961e7 100644 --- a/modules/nixos-modules/sync.nix +++ b/modules/nixos-modules/sync.nix @@ -10,14 +10,14 @@ in { folders = { share = { enable = lib.mkEnableOption "should the share folder by synced"; + calendar = { + enable = lib.mkEnableOption "should the calendar folder be synced"; + }; }; leyla = { documents = { enable = lib.mkEnableOption "should the documents folder be synced"; }; - calendar = { - enable = lib.mkEnableOption "should the calendar folder be synced"; - }; notes = { enable = lib.mkEnableOption "should the notes folder by synced"; }; @@ -86,26 +86,6 @@ in { defiant = lib.mkIf (config.networking.hostName != "defiant") "defiant"; twilight = lib.mkIf (config.networking.hostName != "twilight") "twilight"; horizon = lib.mkIf (config.networking.hostName != "horizon") "horizon"; - allDevices = [ - defiant - ceder - coven - twilight - horizon - shale - ]; - leylaDevices = [ - defiant - ceder - coven - twilight - horizon - ]; - superNoteTablets = [ - defiant - ceder - shale - ]; in lib.mkMerge [ config.host.sync.folders.extraFolders @@ -113,28 +93,48 @@ in { "documents" = { id = "hvrj0-9bm1p"; path = "${mountDir}/leyla/documents"; - devices = leylaDevices; + devices = [ + defiant + ceder + coven + twilight + horizon + ]; }; }) - (lib.mkIf config.host.sync.folders.leyla.calendar.enable { + (lib.mkIf config.host.sync.folders.share.calendar.enable { "calendar" = { id = "8oatl-1rv6w"; - path = "${mountDir}/leyla/calendar"; - devices = superNoteTablets; + path = "${mountDir}/share/calendar"; + devices = [ + defiant + ceder + shale + ]; }; }) (lib.mkIf config.host.sync.folders.leyla.notes.enable { "notes" = { id = "dwbuv-zffnf"; path = "${mountDir}/leyla/notes"; - devices = superNoteTablets; + devices = [ + defiant + ceder + ]; }; }) (lib.mkIf config.host.sync.folders.share.enable { "share" = { id = "73ot0-cxmkx"; path = "${mountDir}/default/share"; - devices = allDevices; + devices = [ + defiant + ceder + coven + twilight + horizon + shale + ]; }; }) ];