From a0e5ffb3d45801d674940caa9817ce91386257c1 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 17 Feb 2025 18:52:02 -0600 Subject: [PATCH] feat: changed naming convention for devices --- flake.nix | 46 +++++----- .../config/{bartholomew.nix => callisto.nix} | 4 +- .../devices/config/{server.nix => ceres.nix} | 20 ++--- .../config/{laptop.nix => ganymede.nix} | 4 +- .../config/{desktop.nix => jupiter.nix} | 4 +- .../config/{fallaryn.nix => saturn.nix} | 4 +- modules/home/default.nix | 24 +++--- .../bookmarks/config/flake/selfHosted.nix | 6 +- .../bookmarks/config/flake/selfHosted.nix | 6 +- modules/nixos/core/doas/default.nix | 16 ++-- modules/nixos/core/ssh/default.nix | 16 ++-- modules/nixos/default.nix | 16 ++-- modules/nixos/services/forgejo/default.nix | 4 +- modules/nixos/services/hLedger/default.nix | 4 +- modules/nixos/services/jellyfin/default.nix | 4 +- modules/nixos/services/mastodon/default.nix | 4 +- modules/nixos/services/minecraft/default.nix | 4 +- modules/nixos/services/nextcloud/default.nix | 4 +- modules/nixos/services/ollama/default.nix | 14 +-- modules/nixos/services/peertube/default.nix | 4 +- modules/nixos/services/postgresql/default.nix | 4 +- modules/nixos/sops/default.nix | 16 ++-- profiles/user0/files/justfile | 2 +- .../{bartholomew => callisto}/config/boot.nix | 0 .../config/filesystem.nix | 4 +- .../config/graphics.nix | 0 .../config/hardware.nix | 0 .../config/networking.nix | 4 +- systems/{bartholomew => callisto}/default.nix | 0 systems/{server => ceres}/config/boot.nix | 3 +- .../{server => ceres}/config/filesystem.nix | 43 +++++----- systems/{server => ceres}/config/graphics.nix | 12 ++- systems/{laptop => ceres}/config/hardware.nix | 3 +- .../{server => ceres}/config/networking.nix | 4 +- systems/{server => ceres}/config/sops.nix | 9 +- systems/ceres/default.nix | 17 ++++ systems/desktop/default.nix | 14 --- systems/fallaryn/config/filesystem.nix | 14 +-- systems/fallaryn/config/networking.nix | 4 +- systems/fallaryn/default.nix | 4 +- systems/{laptop => ganymede}/config/boot.nix | 3 +- systems/ganymede/config/filesystem.nix | 82 ++++++++++++++++++ .../{laptop => ganymede}/config/graphics.nix | 12 ++- .../{server => ganymede}/config/hardware.nix | 3 +- .../config/networking.nix | 13 +-- systems/{laptop => ganymede}/config/sops.nix | 9 +- systems/ganymede/default.nix | 17 ++++ systems/{desktop => jupiter}/config/boot.nix | 0 .../config/filesystem.nix | 26 +++--- .../{desktop => jupiter}/config/graphics.nix | 0 .../{desktop => jupiter}/config/hardware.nix | 6 +- .../config/networking.nix | 13 +-- systems/{desktop => jupiter}/config/sops.nix | 12 +-- systems/jupiter/default.nix | 17 ++++ systems/laptop/config/filesystem.nix | 86 ------------------- systems/laptop/default.nix | 14 --- systems/server/default.nix | 14 --- 57 files changed, 351 insertions(+), 341 deletions(-) rename modules/config/devices/config/{bartholomew.nix => callisto.nix} (83%) rename modules/config/devices/config/{server.nix => ceres.nix} (56%) rename modules/config/devices/config/{laptop.nix => ganymede.nix} (84%) rename modules/config/devices/config/{desktop.nix => jupiter.nix} (92%) rename modules/config/devices/config/{fallaryn.nix => saturn.nix} (92%) rename systems/{bartholomew => callisto}/config/boot.nix (100%) rename systems/{bartholomew => callisto}/config/filesystem.nix (84%) rename systems/{bartholomew => callisto}/config/graphics.nix (100%) rename systems/{bartholomew => callisto}/config/hardware.nix (100%) rename systems/{bartholomew => callisto}/config/networking.nix (91%) rename systems/{bartholomew => callisto}/default.nix (100%) rename systems/{server => ceres}/config/boot.nix (99%) rename systems/{server => ceres}/config/filesystem.nix (50%) rename systems/{server => ceres}/config/graphics.nix (67%) rename systems/{laptop => ceres}/config/hardware.nix (97%) rename systems/{server => ceres}/config/networking.nix (89%) rename systems/{server => ceres}/config/sops.nix (74%) create mode 100755 systems/ceres/default.nix delete mode 100755 systems/desktop/default.nix rename systems/{laptop => ganymede}/config/boot.nix (99%) create mode 100755 systems/ganymede/config/filesystem.nix rename systems/{laptop => ganymede}/config/graphics.nix (67%) rename systems/{server => ganymede}/config/hardware.nix (97%) rename systems/{laptop => ganymede}/config/networking.nix (83%) rename systems/{laptop => ganymede}/config/sops.nix (88%) create mode 100755 systems/ganymede/default.nix rename systems/{desktop => jupiter}/config/boot.nix (100%) rename systems/{desktop => jupiter}/config/filesystem.nix (74%) rename systems/{desktop => jupiter}/config/graphics.nix (100%) rename systems/{desktop => jupiter}/config/hardware.nix (89%) rename systems/{desktop => jupiter}/config/networking.nix (85%) rename systems/{desktop => jupiter}/config/sops.nix (79%) create mode 100755 systems/jupiter/default.nix delete mode 100755 systems/laptop/config/filesystem.nix delete mode 100755 systems/laptop/default.nix delete mode 100755 systems/server/default.nix diff --git a/flake.nix b/flake.nix index cb47133..1031401 100755 --- a/flake.nix +++ b/flake.nix @@ -74,14 +74,14 @@ { config, ... }: { nixosConfigurations = { - desktop = inputs.self.lib.mkLinuxSystem [ - ./systems/desktop + jupiter = inputs.self.lib.mkLinuxSystem [ + ./systems/jupiter ./profiles/user0 ./profiles/user1 - config.nixosModules.desktop + config.nixosModules.jupiter config.nixosModules.core - config.nixosModules.sops - config.nixosModules.system + config.nixosModules.mantle + config.nixosModules.crust inputs.nixos-cosmic.nixosModules.default inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default @@ -89,45 +89,45 @@ inputs.sops-nix.nixosModules.sops inputs.nixvim.nixosModules.nixvim ]; - fallaryn = inputs.self.lib.mkLinuxSystem [ - ./systems/fallaryn + saturn = inputs.self.lib.mkLinuxSystem [ + ./systems/saturn ./profiles/user2 - config.nixosModules.fallaryn + config.nixosModules.saturn config.nixosModules.core - config.nixosModules.sops - config.nixosModules.system + config.nixosModules.mantle + config.nixosModules.crust inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default inputs.sops-nix.nixosModules.sops ]; - laptop = inputs.self.lib.mkLinuxSystem [ - ./systems/laptop + ganymede = inputs.self.lib.mkLinuxSystem [ + ./systems/ganymede ./profiles/user0 ./profiles/user1 - config.nixosModules.laptop + config.nixosModules.ganymede config.nixosModules.core - config.nixosModules.sops - config.nixosModules.system + config.nixosModules.mantle + config.nixosModules.crust inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default inputs.nur.modules.nixos.default inputs.sops-nix.nixosModules.sops ]; - bartholomew = inputs.self.lib.mkLinuxSystem [ - ./systems/bartholomew + callisto = inputs.self.lib.mkLinuxSystem [ + ./systems/callisto ./profiles/user1 - config.nixosModules.laptop + config.nixosModules.callisto config.nixosModules.core - config.nixosModules.system + config.nixosModules.crust inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default ]; - server = inputs.self.lib.mkLinuxSystem [ - ./systems/server + ceres = inputs.self.lib.mkLinuxSystem [ + ./systems/ceres ./profiles/user0 - config.nixosModules.server + config.nixosModules.ceres config.nixosModules.core - config.nixosModules.sops + config.nixosModules.mantle inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default inputs.ngipkgs.nixosModules."services.peertube" diff --git a/modules/config/devices/config/bartholomew.nix b/modules/config/devices/config/callisto.nix similarity index 83% rename from modules/config/devices/config/bartholomew.nix rename to modules/config/devices/config/callisto.nix index 38f487d..347e7fe 100755 --- a/modules/config/devices/config/bartholomew.nix +++ b/modules/config/devices/config/callisto.nix @@ -5,8 +5,8 @@ let ; in { - label = "Bartholomew"; - name = "bartholomew"; + label = "Callisto"; + name = "callisto"; sync = { address0 = ""; }; diff --git a/modules/config/devices/config/server.nix b/modules/config/devices/config/ceres.nix similarity index 56% rename from modules/config/devices/config/server.nix rename to modules/config/devices/config/ceres.nix index a117832..28056be 100755 --- a/modules/config/devices/config/server.nix +++ b/modules/config/devices/config/ceres.nix @@ -7,30 +7,30 @@ let sambaPermissions userIdForUser0 ; - serverName = "server"; - serverIP = "192.168.50.140"; - serverStorageDriveName = "NAS1"; + ceresName = "ceres"; + ceresIP = "192.168.50.140"; + ceresStorageDriveName = "NAS1"; in { - label = "Server"; - name = serverName; + label = "Ceres"; + name = ceresName; sync = { address0 = ""; }; ip = { - address0 = serverIP; + address0 = ceresIP; }; boot = { options = ownerExclusiveReadWriteMask; }; storage0 = { - mount = "/mnt/media/${serverStorageDriveName}"; - device = "/dev/disk/by-label/${serverStorageDriveName}"; + mount = "/mnt/media/${ceresStorageDriveName}"; + device = "/dev/disk/by-label/${ceresStorageDriveName}"; options = readWritePermissions; }; samba0 = { - mount = "/mnt/media/${serverName}"; - device = "//${serverIP}"; + mount = "/mnt/media/${ceresName}"; + device = "//${ceresIP}"; options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0; }; } diff --git a/modules/config/devices/config/laptop.nix b/modules/config/devices/config/ganymede.nix similarity index 84% rename from modules/config/devices/config/laptop.nix rename to modules/config/devices/config/ganymede.nix index 600a7f0..575a739 100755 --- a/modules/config/devices/config/laptop.nix +++ b/modules/config/devices/config/ganymede.nix @@ -5,8 +5,8 @@ let ; in { - label = "Laptop"; - name = "laptop"; + label = "Ganymede"; + name = "ganymede"; sync = { address0 = ""; }; diff --git a/modules/config/devices/config/desktop.nix b/modules/config/devices/config/jupiter.nix similarity index 92% rename from modules/config/devices/config/desktop.nix rename to modules/config/devices/config/jupiter.nix index 2b8c166..94868b3 100755 --- a/modules/config/devices/config/desktop.nix +++ b/modules/config/devices/config/jupiter.nix @@ -6,8 +6,8 @@ let ; in { - label = "Desktop"; - name = "desktop"; + label = "Jupiter"; + name = "jupiter"; sync = { address0 = ""; }; diff --git a/modules/config/devices/config/fallaryn.nix b/modules/config/devices/config/saturn.nix similarity index 92% rename from modules/config/devices/config/fallaryn.nix rename to modules/config/devices/config/saturn.nix index cbb4f0a..7fd0b87 100755 --- a/modules/config/devices/config/fallaryn.nix +++ b/modules/config/devices/config/saturn.nix @@ -8,8 +8,8 @@ let in { - label = "Fallaryn"; - name = "fallaryn"; + label = "Saturn"; + name = "saturn"; ip = { address0 = "192.168.58.104"; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 535e040..b8e33e2 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -7,16 +7,16 @@ in flake.homeModules = let inherit (config.machines.devices) - bartholomew - desktop - fallaryn - laptop - server + callisto + jupiter + saturn + ganymede + ceres ; inherit (config.people) user0 user1 user2; in { - "${desktop.name}-${user0}" = { + "${jupiter.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) cli @@ -55,7 +55,7 @@ in ; }; }; - "${desktop.name}-${user1}" = { + "${jupiter.name}-${user1}" = { imports = builtins.attrValues { inherit (modules) cli @@ -76,7 +76,7 @@ in ; }; }; - "${fallaryn.name}-${user2}" = { + "${saturn.name}-${user2}" = { imports = builtins.attrValues { inherit (modules) cli @@ -106,7 +106,7 @@ in ; }; }; - "${laptop.name}-${user0}" = { + "${ganymede.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) cli @@ -123,7 +123,7 @@ in ; }; }; - "${laptop.name}-${user1}" = { + "${ganymede.name}-${user1}" = { imports = builtins.attrValues { inherit (modules) cli @@ -144,7 +144,7 @@ in ; }; }; - "${bartholomew.name}-${user1}" = { + "${callisto.name}-${user1}" = { imports = builtins.attrValues { inherit (modules) cli @@ -168,7 +168,7 @@ in ; }; }; - "${server.name}-${user0}" = { + "${ceres.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) cli diff --git a/modules/home/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix b/modules/home/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix index 33086ba..31b465c 100755 --- a/modules/home/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix +++ b/modules/home/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix @@ -8,7 +8,7 @@ let ; inherit (flake.config.machines.devices) synology - server + ceres ; inherit (flake.config.services) instances @@ -82,7 +82,7 @@ in } { name = "${instances.jellyfin.label} (Local)"; - url = "http://${server.ip.address0}:${toString instances.jellyfin.ports.port1}"; + url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}"; tags = jellyfinTags; keyword = instances.jellyfin.label; } @@ -141,7 +141,7 @@ in } # { # name = "${instances.owncast.label} (Admin)"; - # url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin"; + # url = "http://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin"; # tags = owncastTags; # keyword = instances.owncast.label; # } diff --git a/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix b/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix index 33086ba..31b465c 100755 --- a/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix +++ b/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix @@ -8,7 +8,7 @@ let ; inherit (flake.config.machines.devices) synology - server + ceres ; inherit (flake.config.services) instances @@ -82,7 +82,7 @@ in } { name = "${instances.jellyfin.label} (Local)"; - url = "http://${server.ip.address0}:${toString instances.jellyfin.ports.port1}"; + url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}"; tags = jellyfinTags; keyword = instances.jellyfin.label; } @@ -141,7 +141,7 @@ in } # { # name = "${instances.owncast.label} (Admin)"; - # url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin"; + # url = "http://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin"; # tags = owncastTags; # keyword = instances.owncast.label; # } diff --git a/modules/nixos/core/doas/default.nix b/modules/nixos/core/doas/default.nix index 980b2ac..3f52e26 100755 --- a/modules/nixos/core/doas/default.nix +++ b/modules/nixos/core/doas/default.nix @@ -9,10 +9,10 @@ let devices ; hostname = config.networking.hostName; - desktop = devices.desktop.name; - server = devices.server.name; - fallaryn = devices.fallaryn.name; - bartholomew = devices.bartholomew.name; + jupiter = devices.jupiter.name; + ceres = devices.ceres.name; + saturn = devices.saturn.names; + callisto = devices.callisto.name; in { security = { @@ -24,13 +24,13 @@ in noPass = true; users = [ ( - if hostname == desktop then + if hostname == jupiter then user0 - else if hostname == server then + else if hostname == ceres then user0 - else if hostname == bartholomew then + else if hostname == callisto then user1 - else if hostname == fallaryn then + else if hostname == saturn then user2 else "" diff --git a/modules/nixos/core/ssh/default.nix b/modules/nixos/core/ssh/default.nix index 3cd5d16..d53bd15 100755 --- a/modules/nixos/core/ssh/default.nix +++ b/modules/nixos/core/ssh/default.nix @@ -16,24 +16,24 @@ let devices ; hostname = config.networking.hostName; - desktop = devices.desktop.name; - server = devices.server.name; - fallaryn = devices.fallaryn.name; - bartholomew = devices.bartholomew.name; + jupiter = devices.jupiter.name; + ceres = devices.ceres.name; + saturn = devices.saturn.name; + callisto = devices.callisto.name; userLogic = - if hostname == desktop then + if hostname == jupiter then user0 - else if hostname == server then + else if hostname == ceres then user0 - else if hostname == fallaryn then + else if hostname == saturn then user2 else ""; in { users.users = - if hostname == bartholomew then + if hostname == callisto then { } else { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index c32aab1..b1b397f 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -4,7 +4,7 @@ let in { flake.nixosModules = { - desktop = { + jupiter = { imports = builtins.attrValues { inherit (modules) mullvad @@ -17,7 +17,7 @@ in }; }; - fallaryn = { + saturn = { imports = builtins.attrValues { inherit (modules) plasma @@ -27,7 +27,7 @@ in }; }; - laptop = { + ganymede = { imports = builtins.attrValues { inherit (modules) gnome @@ -36,7 +36,7 @@ in }; }; - server = { + ceres = { imports = builtins.attrValues { inherit (modules) acme @@ -51,11 +51,13 @@ in samba vaultwarden forgejo + wayland + xserver ; }; }; - sops = { + mantle = { imports = builtins.attrValues { inherit (modules) sops @@ -63,7 +65,7 @@ in }; }; - system = { + crust = { imports = builtins.attrValues { inherit (modules) hardware @@ -76,8 +78,6 @@ in imports = builtins.attrValues { inherit (modules) core - wayland - xserver ; }; }; diff --git a/modules/nixos/services/forgejo/default.nix b/modules/nixos/services/forgejo/default.nix index 0a460ec..ef3c041 100755 --- a/modules/nixos/services/forgejo/default.nix +++ b/modules/nixos/services/forgejo/default.nix @@ -5,7 +5,7 @@ }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) smtp forgejo web; service = forgejo; @@ -96,7 +96,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/hLedger/default.nix b/modules/nixos/services/hLedger/default.nix index ed947f1..b88433d 100755 --- a/modules/nixos/services/hLedger/default.nix +++ b/modules/nixos/services/hLedger/default.nix @@ -5,7 +5,7 @@ }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) hledger @@ -54,7 +54,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix index 2cf6cb3..9de69c2 100755 --- a/modules/nixos/services/jellyfin/default.nix +++ b/modules/nixos/services/jellyfin/default.nix @@ -4,7 +4,7 @@ let user0 ; inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) jellyfin @@ -49,7 +49,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; in diff --git a/modules/nixos/services/mastodon/default.nix b/modules/nixos/services/mastodon/default.nix index 1c10ca9..62da572 100755 --- a/modules/nixos/services/mastodon/default.nix +++ b/modules/nixos/services/mastodon/default.nix @@ -7,7 +7,7 @@ }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) smtp mastodon web; service = mastodon; @@ -192,7 +192,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/minecraft/default.nix b/modules/nixos/services/minecraft/default.nix index 9ce53bf..c92ce69 100755 --- a/modules/nixos/services/minecraft/default.nix +++ b/modules/nixos/services/minecraft/default.nix @@ -5,7 +5,7 @@ }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) minecraft @@ -83,7 +83,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix index 4e82ba5..4f9b42a 100755 --- a/modules/nixos/services/nextcloud/default.nix +++ b/modules/nixos/services/nextcloud/default.nix @@ -12,7 +12,7 @@ let name ; inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) nextcloud @@ -113,7 +113,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/ollama/default.nix b/modules/nixos/services/ollama/default.nix index 622a456..5b19142 100755 --- a/modules/nixos/services/ollama/default.nix +++ b/modules/nixos/services/ollama/default.nix @@ -6,8 +6,8 @@ }: let inherit (flake.config.machines.devices) - desktop - server + jupiter + ceres ; inherit (flake.config.services.instances) ollama @@ -19,7 +19,7 @@ let host = "${service.subdomain}.${web.domains.url0}"; caddyLogic = - if hostname == server.name then + if hostname == ceres.name then { caddy = { virtualHosts = { @@ -37,7 +37,7 @@ let { }; mountLogic = - if hostname == server.name then + if hostname == ceres.name then { "/var/lib/${service.name}" = { device = service.paths.path0; @@ -46,7 +46,7 @@ let "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; } @@ -63,7 +63,7 @@ in user = service.name; } // ( - if hostname == desktop.name then + if hostname == jupiter.name then { models = service.paths.path1; acceleration = "rocm"; @@ -98,7 +98,7 @@ in systemd.tmpfiles.rules = [ ( - if hostname == desktop.name then + if hostname == jupiter.name then "Z ${service.paths.path1} 0777 ${service.name} ${service.name} -" else "Z ${service.paths.path0} 0755 ${service.name} ${service.name} -" diff --git a/modules/nixos/services/peertube/default.nix b/modules/nixos/services/peertube/default.nix index fa27c99..091cd90 100755 --- a/modules/nixos/services/peertube/default.nix +++ b/modules/nixos/services/peertube/default.nix @@ -6,7 +6,7 @@ }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) caddy @@ -123,7 +123,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/services/postgresql/default.nix b/modules/nixos/services/postgresql/default.nix index 0490c97..4eeb552 100755 --- a/modules/nixos/services/postgresql/default.nix +++ b/modules/nixos/services/postgresql/default.nix @@ -1,7 +1,7 @@ { flake, ... }: let inherit (flake.config.machines.devices) - server + ceres ; inherit (flake.config.services.instances) postgresql @@ -40,7 +40,7 @@ in "bind" ]; depends = [ - server.storage0.mount + ceres.storage0.mount ]; }; diff --git a/modules/nixos/sops/default.nix b/modules/nixos/sops/default.nix index 7742422..b9090ad 100755 --- a/modules/nixos/sops/default.nix +++ b/modules/nixos/sops/default.nix @@ -8,17 +8,17 @@ let devices ; hostname = config.networking.hostName; - desktop = devices.desktop.name; - server = devices.server.name; - fallaryn = devices.fallaryn.name; - bartholomew = devices.bartholomew.name; + jupiter = devices.jupiter.name; + ceres = devices.ceres.name; + saturn = devices.saturn.name; + callisto = devices.callisto.name; userLogic = - if hostname == desktop then + if hostname == jupiter then user0 - else if hostname == server then + else if hostname == ceres then user0 - else if hostname == fallaryn then + else if hostname == saturn then user2 else ""; @@ -32,7 +32,7 @@ in generateKey = false; }; secrets = - if hostname == bartholomew then + if hostname == callisto then { } else { diff --git a/profiles/user0/files/justfile b/profiles/user0/files/justfile index 748bc6e..4e83af0 100755 --- a/profiles/user0/files/justfile +++ b/profiles/user0/files/justfile @@ -5,7 +5,7 @@ vpnoff: sudo protonvpn d rebuild: - nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#desktop --show-trace + nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#jupiter --show-trace elm: cd ~/Files/Projects/website/frontend; elm-land server diff --git a/systems/bartholomew/config/boot.nix b/systems/callisto/config/boot.nix similarity index 100% rename from systems/bartholomew/config/boot.nix rename to systems/callisto/config/boot.nix diff --git a/systems/bartholomew/config/filesystem.nix b/systems/callisto/config/filesystem.nix similarity index 84% rename from systems/bartholomew/config/filesystem.nix rename to systems/callisto/config/filesystem.nix index 5d84fb7..a146e65 100755 --- a/systems/bartholomew/config/filesystem.nix +++ b/systems/callisto/config/filesystem.nix @@ -5,7 +5,7 @@ }: let inherit (flake.config.people) user1; - inherit (flake.config.machines.devices) bartholomew; + inherit (flake.config.machines.devices) callisto; in { fileSystems = { @@ -16,7 +16,7 @@ in "/boot" = { device = "/dev/disk/by-uuid/1703-D452"; fsType = "vfat"; - options = bartholomew.boot.options; + options = callisto.boot.options; }; }; diff --git a/systems/bartholomew/config/graphics.nix b/systems/callisto/config/graphics.nix similarity index 100% rename from systems/bartholomew/config/graphics.nix rename to systems/callisto/config/graphics.nix diff --git a/systems/bartholomew/config/hardware.nix b/systems/callisto/config/hardware.nix similarity index 100% rename from systems/bartholomew/config/hardware.nix rename to systems/callisto/config/hardware.nix diff --git a/systems/bartholomew/config/networking.nix b/systems/callisto/config/networking.nix similarity index 91% rename from systems/bartholomew/config/networking.nix rename to systems/callisto/config/networking.nix index 8852dcd..451c38d 100755 --- a/systems/bartholomew/config/networking.nix +++ b/systems/callisto/config/networking.nix @@ -5,12 +5,12 @@ }: let inherit (flake.config.machines.devices) - bartholomew + callisto ; in { networking = { - hostName = bartholomew.name; + hostName = callisto.name; networkmanager.enable = true; nftables.enable = true; useDHCP = lib.mkDefault true; diff --git a/systems/bartholomew/default.nix b/systems/callisto/default.nix similarity index 100% rename from systems/bartholomew/default.nix rename to systems/callisto/default.nix diff --git a/systems/server/config/boot.nix b/systems/ceres/config/boot.nix similarity index 99% rename from systems/server/config/boot.nix rename to systems/ceres/config/boot.nix index 6a81c4a..6f25045 100755 --- a/systems/server/config/boot.nix +++ b/systems/ceres/config/boot.nix @@ -2,7 +2,8 @@ pkgs, config, ... -}: { +}: +{ boot = { extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out diff --git a/systems/server/config/filesystem.nix b/systems/ceres/config/filesystem.nix similarity index 50% rename from systems/server/config/filesystem.nix rename to systems/ceres/config/filesystem.nix index d625fc2..b7ce342 100755 --- a/systems/server/config/filesystem.nix +++ b/systems/ceres/config/filesystem.nix @@ -2,30 +2,31 @@ flake, config, ... -}: let - inherit - (flake.config.people) +}: +let + inherit (flake.config.people) user0 ; - inherit - (flake.config.machines.devices) - server + inherit (flake.config.machines.devices) + ceres ; -in { - fileSystems = let - storageDrives = [ - "storage0" - ]; +in +{ + fileSystems = + let + storageDrives = [ + "storage0" + ]; - storageMounts = storage: { - name = "${server.${storage}.mount}"; - value = { - device = server.${storage}.device; - fsType = "ext4"; - options = server.${storage}.options; + storageMounts = storage: { + name = "${ceres.${storage}.mount}"; + value = { + device = ceres.${storage}.device; + fsType = "ext4"; + options = ceres.${storage}.options; + }; }; - }; - in + in { "/" = { device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd"; @@ -39,12 +40,12 @@ in { // (builtins.listToAttrs (map storageMounts storageDrives)); swapDevices = [ - {device = "/dev/disk/by-uuid/259fcc06-912c-4bd3-b781-8f77449e935a";} + { device = "/dev/disk/by-uuid/259fcc06-912c-4bd3-b781-8f77449e935a"; } ]; systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" - "Z ${server.storage0.mount} 2775 root root -" + "Z ${ceres.storage0.mount} 2775 root root -" ]; services.udisks2.enable = true; diff --git a/systems/server/config/graphics.nix b/systems/ceres/config/graphics.nix similarity index 67% rename from systems/server/config/graphics.nix rename to systems/ceres/config/graphics.nix index e4a09d0..b67a5df 100755 --- a/systems/server/config/graphics.nix +++ b/systems/ceres/config/graphics.nix @@ -1,20 +1,18 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ hardware = { graphics = { enable = true; extraPackages = builtins.attrValues { - inherit - (pkgs) + inherit (pkgs) amdvlk ; - inherit - (pkgs.rocmPackages.clr) + inherit (pkgs.rocmPackages.clr) icd ; }; extraPackages32 = builtins.attrValues { - inherit - (pkgs.driversi686Linux) + inherit (pkgs.driversi686Linux) amdvlk ; }; diff --git a/systems/laptop/config/hardware.nix b/systems/ceres/config/hardware.nix similarity index 97% rename from systems/laptop/config/hardware.nix rename to systems/ceres/config/hardware.nix index d527808..60e08be 100755 --- a/systems/laptop/config/hardware.nix +++ b/systems/ceres/config/hardware.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ hardware = { firmware = [ pkgs.rtl8761b-firmware diff --git a/systems/server/config/networking.nix b/systems/ceres/config/networking.nix similarity index 89% rename from systems/server/config/networking.nix rename to systems/ceres/config/networking.nix index 6f463de..0892600 100755 --- a/systems/server/config/networking.nix +++ b/systems/ceres/config/networking.nix @@ -4,11 +4,11 @@ ... }: let - inherit (flake.config.machines.devices) server; + inherit (flake.config.machines.devices) ceres; in { networking = { - hostName = server.name; + hostName = ceres.name; networkmanager.enable = true; nftables.enable = true; useDHCP = lib.mkDefault true; diff --git a/systems/server/config/sops.nix b/systems/ceres/config/sops.nix similarity index 74% rename from systems/server/config/sops.nix rename to systems/ceres/config/sops.nix index 7aa3ff0..3534cf3 100755 --- a/systems/server/config/sops.nix +++ b/systems/ceres/config/sops.nix @@ -1,9 +1,10 @@ -{flake, ...}: let - inherit - (flake.config.people) +{ flake, ... }: +let + inherit (flake.config.people) user0 ; -in { +in +{ sops = { secrets = { "discord-token" = { diff --git a/systems/ceres/default.nix b/systems/ceres/default.nix new file mode 100755 index 0000000..d1f0003 --- /dev/null +++ b/systems/ceres/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: +let + configPath = ./config; + + ceresImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); +in +{ + imports = ceresImports; + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; + system.stateVersion = lib.mkForce "24.05"; +} diff --git a/systems/desktop/default.nix b/systems/desktop/default.nix deleted file mode 100755 index 42a9178..0000000 --- a/systems/desktop/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{lib, ...}: let - configPath = ./config; - - desktopImports = let - files = builtins.attrNames (builtins.readDir configPath); - in - map - (name: configPath + "/${name}") - (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files); -in { - imports = desktopImports; - nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; - system.stateVersion = lib.mkForce "24.05"; -} diff --git a/systems/fallaryn/config/filesystem.nix b/systems/fallaryn/config/filesystem.nix index 87d54a7..6e54180 100755 --- a/systems/fallaryn/config/filesystem.nix +++ b/systems/fallaryn/config/filesystem.nix @@ -5,7 +5,7 @@ }: let inherit (flake.config.people) user2; - inherit (flake.config.machines.devices) fallaryn; + inherit (flake.config.machines.devices) saturn; in { imports = [ ]; @@ -18,11 +18,11 @@ in ]; storageMounts = storage: { - name = "${fallaryn.${storage}.mount}"; + name = "${saturn.${storage}.mount}"; value = { - device = fallaryn.${storage}.device; + device = saturn.${storage}.device; fsType = "ext4"; - options = fallaryn.${storage}.options; + options = saturn.${storage}.options; }; }; in @@ -34,7 +34,7 @@ in "/boot" = { device = "/dev/disk/by-uuid/22BD-5A25"; fsType = "vfat"; - options = fallaryn.boot.options; + options = saturn.boot.options; }; } // (builtins.listToAttrs (map storageMounts storageDrives)); @@ -45,8 +45,8 @@ in systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user2}.home.homeDirectory} 0755 ${user2} users -" - "Z ${fallaryn.storage0.mount} 0755 ${user2} users -" - "Z ${fallaryn.storage1.mount} 0755 ${user2} users -" + "Z ${saturn.storage0.mount} 0755 ${user2} users -" + "Z ${saturn.storage1.mount} 0755 ${user2} users -" ]; services.udisks2.enable = true; diff --git a/systems/fallaryn/config/networking.nix b/systems/fallaryn/config/networking.nix index d3a67f4..54bdeb3 100755 --- a/systems/fallaryn/config/networking.nix +++ b/systems/fallaryn/config/networking.nix @@ -4,11 +4,11 @@ ... }: let - inherit (flake.config.machines.devices) fallaryn; + inherit (flake.config.machines.devices) saturn; in { networking = { - hostName = fallaryn.name; + hostName = saturn.name; networkmanager.enable = true; useDHCP = lib.mkDefault true; firewall = { diff --git a/systems/fallaryn/default.nix b/systems/fallaryn/default.nix index 94aacef..76e2a29 100755 --- a/systems/fallaryn/default.nix +++ b/systems/fallaryn/default.nix @@ -5,7 +5,7 @@ let configPath = ./config; - fallarynImports = + saturnImports = let files = builtins.attrNames (builtins.readDir configPath); in @@ -14,7 +14,7 @@ let ); in { - imports = fallarynImports; + imports = saturnImports; nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; system.stateVersion = lib.mkForce "24.05"; } diff --git a/systems/laptop/config/boot.nix b/systems/ganymede/config/boot.nix similarity index 99% rename from systems/laptop/config/boot.nix rename to systems/ganymede/config/boot.nix index 6a81c4a..6f25045 100755 --- a/systems/laptop/config/boot.nix +++ b/systems/ganymede/config/boot.nix @@ -2,7 +2,8 @@ pkgs, config, ... -}: { +}: +{ boot = { extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out diff --git a/systems/ganymede/config/filesystem.nix b/systems/ganymede/config/filesystem.nix new file mode 100755 index 0000000..bd0ba53 --- /dev/null +++ b/systems/ganymede/config/filesystem.nix @@ -0,0 +1,82 @@ +{ + flake, + config, + ... +}: +let + inherit (flake.config.people) + user0 + user1 + ; + inherit (flake.config.machines.devices) + ganymede + synology + ceres + ; + inherit (flake.config.services.instances) + samba + ; + + synologySecrets = config.sops.secrets."network/synology".path; + ceresSecrets = config.sops.secrets."network/server".path; +in +{ + fileSystems = + let + synologyDrives = [ + "folder0" + "folder1" + "folder2" + ]; + + sambaDrives = [ + "samba0" + ]; + + synologyMounts = synologyDrive: { + name = "${synology.${synologyDrive}.mount}"; + value = { + device = synology.${synologyDrive}.device; + fsType = "cifs"; + options = synology.${synologyDrive}.options ++ [ + "credentials=${synologySecrets}" + ]; + }; + }; + + sambaMounts = sambaDrive: { + name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}"; + value = { + device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}"; + fsType = "cifs"; + options = ceres.${sambaDrive}.options ++ [ + "credentials=${ceresSecrets}" + ]; + }; + }; + in + { + "/" = { + device = "/dev/disk/by-uuid/aae33e00-125e-4f1c-b9aa-9fc512335b7f"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/C506-9E18"; + fsType = "vfat"; + options = ganymede.boot.options; + }; + } + // (builtins.listToAttrs (map synologyMounts synologyDrives)) + // (builtins.listToAttrs (map sambaMounts sambaDrives)); + + swapDevices = [ + { device = "/dev/disk/by-uuid/68d6072a-e21b-4d11-88fd-22c5b9932a50"; } + ]; + + systemd.tmpfiles.rules = [ + "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" + "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" + ]; + + services.udisks2.enable = true; +} diff --git a/systems/laptop/config/graphics.nix b/systems/ganymede/config/graphics.nix similarity index 67% rename from systems/laptop/config/graphics.nix rename to systems/ganymede/config/graphics.nix index e4a09d0..b67a5df 100755 --- a/systems/laptop/config/graphics.nix +++ b/systems/ganymede/config/graphics.nix @@ -1,20 +1,18 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ hardware = { graphics = { enable = true; extraPackages = builtins.attrValues { - inherit - (pkgs) + inherit (pkgs) amdvlk ; - inherit - (pkgs.rocmPackages.clr) + inherit (pkgs.rocmPackages.clr) icd ; }; extraPackages32 = builtins.attrValues { - inherit - (pkgs.driversi686Linux) + inherit (pkgs.driversi686Linux) amdvlk ; }; diff --git a/systems/server/config/hardware.nix b/systems/ganymede/config/hardware.nix similarity index 97% rename from systems/server/config/hardware.nix rename to systems/ganymede/config/hardware.nix index d527808..60e08be 100755 --- a/systems/server/config/hardware.nix +++ b/systems/ganymede/config/hardware.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ hardware = { firmware = [ pkgs.rtl8761b-firmware diff --git a/systems/laptop/config/networking.nix b/systems/ganymede/config/networking.nix similarity index 83% rename from systems/laptop/config/networking.nix rename to systems/ganymede/config/networking.nix index 95ee500..9d71960 100755 --- a/systems/laptop/config/networking.nix +++ b/systems/ganymede/config/networking.nix @@ -2,14 +2,15 @@ lib, flake, ... -}: let - inherit - (flake.config.machines.devices) - laptop +}: +let + inherit (flake.config.machines.devices) + ganymede ; -in { +in +{ networking = { - hostName = laptop.name; + hostName = ganymede.name; networkmanager.enable = true; nftables.enable = true; useDHCP = lib.mkDefault true; diff --git a/systems/laptop/config/sops.nix b/systems/ganymede/config/sops.nix similarity index 88% rename from systems/laptop/config/sops.nix rename to systems/ganymede/config/sops.nix index d68bd40..45e8114 100755 --- a/systems/laptop/config/sops.nix +++ b/systems/ganymede/config/sops.nix @@ -1,9 +1,10 @@ -{flake, ...}: let - inherit - (flake.config.people) +{ flake, ... }: +let + inherit (flake.config.people) user1 ; -in { +in +{ sops = { secrets = { "network/synology" = { diff --git a/systems/ganymede/default.nix b/systems/ganymede/default.nix new file mode 100755 index 0000000..067b37c --- /dev/null +++ b/systems/ganymede/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: +let + configPath = ./config; + + ganymedeImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); +in +{ + imports = ganymedeImports; + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; + system.stateVersion = lib.mkForce "24.05"; +} diff --git a/systems/desktop/config/boot.nix b/systems/jupiter/config/boot.nix similarity index 100% rename from systems/desktop/config/boot.nix rename to systems/jupiter/config/boot.nix diff --git a/systems/desktop/config/filesystem.nix b/systems/jupiter/config/filesystem.nix similarity index 74% rename from systems/desktop/config/filesystem.nix rename to systems/jupiter/config/filesystem.nix index b71c625..0ca3532 100755 --- a/systems/desktop/config/filesystem.nix +++ b/systems/jupiter/config/filesystem.nix @@ -9,8 +9,8 @@ let user1 ; inherit (flake.config.machines.devices) - desktop - server + jupiter + ceres synology ; inherit (flake.config.services.instances) @@ -18,7 +18,7 @@ let ; synologySecrets = config.sops.secrets."network/synology".path; - serverSecrets = config.sops.secrets."network/server".path; + ceresSecrets = config.sops.secrets."network/server".path; in { fileSystems = @@ -50,21 +50,21 @@ in }; storageMounts = storageDrive: { - name = "${desktop.${storageDrive}.mount}"; + name = "${jupiter.${storageDrive}.mount}"; value = { - device = desktop.${storageDrive}.device; + device = jupiter.${storageDrive}.device; fsType = "ext4"; - options = desktop.${storageDrive}.options; + options = jupiter.${storageDrive}.options; }; }; sambaMounts = sambaDrive: { - name = "${server.${sambaDrive}.mount}/${samba.paths.path1}"; + name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}"; value = { - device = "${server.${sambaDrive}.device}/${samba.paths.path1}"; + device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}"; fsType = "cifs"; - options = server.${sambaDrive}.options ++ [ - "credentials=${serverSecrets}" + options = ceres.${sambaDrive}.options ++ [ + "credentials=${ceresSecrets}" ]; }; }; @@ -77,7 +77,7 @@ in "/boot" = { device = "/dev/disk/by-uuid/73E2-4DC1"; fsType = "vfat"; - options = desktop.boot.options; + options = jupiter.boot.options; }; } // (builtins.listToAttrs (map synologyMounts synologyDrives)) @@ -91,8 +91,8 @@ in systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" - "Z ${desktop.storage0.mount} 0755 ${user0} users -" - "Z ${desktop.storage1.mount} 0755 ${user0} users -" + "Z ${jupiter.storage0.mount} 0755 ${user0} users -" + "Z ${jupiter.storage1.mount} 0755 ${user0} users -" ]; services.udisks2.enable = true; diff --git a/systems/desktop/config/graphics.nix b/systems/jupiter/config/graphics.nix similarity index 100% rename from systems/desktop/config/graphics.nix rename to systems/jupiter/config/graphics.nix diff --git a/systems/desktop/config/hardware.nix b/systems/jupiter/config/hardware.nix similarity index 89% rename from systems/desktop/config/hardware.nix rename to systems/jupiter/config/hardware.nix index 244aee9..41a7808 100755 --- a/systems/desktop/config/hardware.nix +++ b/systems/jupiter/config/hardware.nix @@ -3,11 +3,11 @@ lib, pkgs, ... -}: { +}: +{ hardware = { firmware = builtins.attrValues { - inherit - (pkgs) + inherit (pkgs) rtl8761b-firmware ; }; diff --git a/systems/desktop/config/networking.nix b/systems/jupiter/config/networking.nix similarity index 85% rename from systems/desktop/config/networking.nix rename to systems/jupiter/config/networking.nix index ad95773..ed015c6 100755 --- a/systems/desktop/config/networking.nix +++ b/systems/jupiter/config/networking.nix @@ -2,14 +2,15 @@ lib, flake, ... -}: let - inherit - (flake.config.machines.devices) - desktop +}: +let + inherit (flake.config.machines.devices) + jupiter ; -in { +in +{ networking = { - hostName = desktop.name; + hostName = jupiter.name; networkmanager.enable = true; nftables.enable = true; useDHCP = lib.mkDefault true; diff --git a/systems/desktop/config/sops.nix b/systems/jupiter/config/sops.nix similarity index 79% rename from systems/desktop/config/sops.nix rename to systems/jupiter/config/sops.nix index 7f69098..376faf3 100755 --- a/systems/desktop/config/sops.nix +++ b/systems/jupiter/config/sops.nix @@ -1,13 +1,13 @@ -{flake, ...}: let - inherit - (flake.config.people) +{ flake, ... }: +let + inherit (flake.config.people) user0 ; - inherit - (flake.config.people.users.${user0}) + inherit (flake.config.people.users.${user0}) paths ; -in { +in +{ sops = { secrets = { "network/synology" = { diff --git a/systems/jupiter/default.nix b/systems/jupiter/default.nix new file mode 100755 index 0000000..84ec802 --- /dev/null +++ b/systems/jupiter/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: +let + configPath = ./config; + + jupiterImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); +in +{ + imports = jupiterImports; + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; + system.stateVersion = lib.mkForce "24.05"; +} diff --git a/systems/laptop/config/filesystem.nix b/systems/laptop/config/filesystem.nix deleted file mode 100755 index d81e8a7..0000000 --- a/systems/laptop/config/filesystem.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ - flake, - config, - ... -}: let - inherit - (flake.config.people) - user0 - user1 - ; - inherit - (flake.config.machines.devices) - laptop - synology - server - ; - inherit - (flake.config.services.instances) - samba - ; - - synologySecrets = config.sops.secrets."network/synology".path; - serverSecrets = config.sops.secrets."network/server".path; -in { - fileSystems = let - synologyDrives = [ - "folder0" - "folder1" - "folder2" - ]; - - sambaDrives = [ - "samba0" - ]; - - synologyMounts = synologyDrive: { - name = "${synology.${synologyDrive}.mount}"; - value = { - device = synology.${synologyDrive}.device; - fsType = "cifs"; - options = - synology.${synologyDrive}.options - ++ [ - "credentials=${synologySecrets}" - ]; - }; - }; - - sambaMounts = sambaDrive: { - name = "${server.${sambaDrive}.mount}/${samba.paths.path1}"; - value = { - device = "${server.${sambaDrive}.device}/${samba.paths.path1}"; - fsType = "cifs"; - options = - server.${sambaDrive}.options - ++ [ - "credentials=${serverSecrets}" - ]; - }; - }; - in - { - "/" = { - device = "/dev/disk/by-uuid/aae33e00-125e-4f1c-b9aa-9fc512335b7f"; - fsType = "ext4"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/C506-9E18"; - fsType = "vfat"; - options = laptop.boot.options; - }; - } - // (builtins.listToAttrs (map synologyMounts synologyDrives)) - // (builtins.listToAttrs (map sambaMounts sambaDrives)); - - swapDevices = [ - {device = "/dev/disk/by-uuid/68d6072a-e21b-4d11-88fd-22c5b9932a50";} - ]; - - systemd.tmpfiles.rules = [ - "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" - "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" - ]; - - services.udisks2.enable = true; -} diff --git a/systems/laptop/default.nix b/systems/laptop/default.nix deleted file mode 100755 index e880c17..0000000 --- a/systems/laptop/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{lib, ...}: let - configPath = ./config; - - laptopImports = let - files = builtins.attrNames (builtins.readDir configPath); - in - map - (name: configPath + "/${name}") - (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files); -in { - imports = laptopImports; - nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; - system.stateVersion = lib.mkForce "24.05"; -} diff --git a/systems/server/default.nix b/systems/server/default.nix deleted file mode 100755 index 2c04e96..0000000 --- a/systems/server/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{lib, ...}: let - configPath = ./config; - - serverImports = let - files = builtins.attrNames (builtins.readDir configPath); - in - map - (name: configPath + "/${name}") - (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files); -in { - imports = serverImports; - nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; - system.stateVersion = lib.mkForce "24.05"; -}