From 96bbb1934a445cc4843ddcef6580971a97776990 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 5 Jan 2025 13:37:13 +0000 Subject: [PATCH] Revert "Restructure NixOS host configuration files" This reverts commit f92ad2b5ab6430586e26b46c70f57ccac74bc9bc. --- flake.nix | 8 +++---- nix/hosts/PW05CH3L/configuration.nix | 20 +---------------- nix/hosts/PW05CH3L/default.nix | 21 ++++++++++++++++++ nix/hosts/lemp11/configuration.nix | 2 -- nix/hosts/lemp11/default.nix | 32 ++++++++++++++++++++++++++++ nix/hosts/nixedo/configuration.nix | 32 ---------------------------- nix/hosts/nixedo/default.nix | 30 ++++++++++++++++++++++++++ nix/hosts/nixedo/extra.nix | 9 ++++++++ nix/hosts/t490/configuration.nix | 13 ----------- nix/hosts/t490/default.nix | 17 +++++++++++++++ 10 files changed, 114 insertions(+), 70 deletions(-) create mode 100644 nix/hosts/PW05CH3L/default.nix create mode 100644 nix/hosts/lemp11/default.nix create mode 100644 nix/hosts/nixedo/default.nix create mode 100644 nix/hosts/nixedo/extra.nix create mode 100644 nix/hosts/t490/default.nix diff --git a/flake.nix b/flake.nix index ed3b936..24044c9 100644 --- a/flake.nix +++ b/flake.nix @@ -73,7 +73,7 @@ modules = [ agenix.nixosModules.default - ./nix/hosts/lemp11/configuration.nix + ./nix/hosts/lemp11 ]; }; @@ -87,7 +87,7 @@ modules = [ agenix.nixosModules.default - ./nix/hosts/nixedo/configuration.nix + ./nix/hosts/nixedo ]; }; @@ -102,7 +102,7 @@ nixos-hardware.nixosModules.common-gpu-intel nixos-hardware.nixosModules.lenovo-thinkpad-t490 - ./nix/hosts/t490/configuration.nix + ./nix/hosts/t490 ]; }; @@ -120,7 +120,7 @@ disko.nixosModules.disko nixos-wsl.nixosModules.default - ./nix/hosts/PW05CH3L/configuration.nix + ./nix/hosts/PW05CH3L ]; }; diff --git a/nix/hosts/PW05CH3L/configuration.nix b/nix/hosts/PW05CH3L/configuration.nix index 24afffe..ccc0d6e 100644 --- a/nix/hosts/PW05CH3L/configuration.nix +++ b/nix/hosts/PW05CH3L/configuration.nix @@ -1,24 +1,6 @@ -{ inputs, username, ... }: +{ inputs, ... }: { - imports = [ - ../common - ../../users/opdavies - - ./configuration.nix - ]; - - features = { - cli = { - docker.enable = true; - }; - }; - - wsl = { - enable = true; - defaultUser = username; - }; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nix = { diff --git a/nix/hosts/PW05CH3L/default.nix b/nix/hosts/PW05CH3L/default.nix new file mode 100644 index 0000000..1646bc4 --- /dev/null +++ b/nix/hosts/PW05CH3L/default.nix @@ -0,0 +1,21 @@ +{ username, ... }: + +{ + imports = [ + ../common + ../../users/opdavies + + ./configuration.nix + ]; + + features = { + cli = { + docker.enable = true; + }; + }; + + wsl = { + enable = true; + defaultUser = username; + }; +} diff --git a/nix/hosts/lemp11/configuration.nix b/nix/hosts/lemp11/configuration.nix index f7a437d..478bc2b 100644 --- a/nix/hosts/lemp11/configuration.nix +++ b/nix/hosts/lemp11/configuration.nix @@ -15,8 +15,6 @@ ./hardware-configuration.nix - ../common - ../../users/opdavies ../../users/eric ../../users/luke ]; diff --git a/nix/hosts/lemp11/default.nix b/nix/hosts/lemp11/default.nix new file mode 100644 index 0000000..57b6c7c --- /dev/null +++ b/nix/hosts/lemp11/default.nix @@ -0,0 +1,32 @@ +{ ... }: + +{ + features = { + cli = { + docker.enable = true; + }; + + desktop = { + autorandr.enable = true; + gaming.enable = true; + peek.enable = true; + }; + + homelab = { + forgejo.enable = true; + gitea.enable = true; + immich.enable = true; + jellyfin.enable = true; + paperless.enable = true; + pihole.enable = true; + tubearchivist-container.enable = true; + }; + }; + + imports = [ + ../common + ../../users/opdavies + + ./configuration.nix + ]; +} diff --git a/nix/hosts/nixedo/configuration.nix b/nix/hosts/nixedo/configuration.nix index ec4c07e..635a22f 100644 --- a/nix/hosts/nixedo/configuration.nix +++ b/nix/hosts/nixedo/configuration.nix @@ -6,35 +6,11 @@ { imports = [ - ../common - ../../users/opdavies - ./hardware-configuration.nix - ./secrets.nix ./modules/acme.nix ]; - features = { - cli = { - docker.enable = true; - }; - - homelab = { - audiobookshelf.enable = true; - beaverhabits.enable = true; - forgejo.enable = true; - freshrss.enable = true; - gitea.enable = true; - immich.enable = true; - jellyfin.enable = true; - paperless.enable = true; - pihole.enable = true; - tubearchivist-container.enable = true; - vaultwarden.enable = true; - }; - }; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; boot.loader = { @@ -58,12 +34,4 @@ ]; services.caddy.enable = true; - - programs.dconf.enable = true; - - services.logind.lidSwitchExternalPower = "ignore"; - - age.identityPaths = [ - "/home/opdavies/.ssh/id_rsa" - ]; } diff --git a/nix/hosts/nixedo/default.nix b/nix/hosts/nixedo/default.nix new file mode 100644 index 0000000..5a6d0ad --- /dev/null +++ b/nix/hosts/nixedo/default.nix @@ -0,0 +1,30 @@ +{ + features = { + cli = { + docker.enable = true; + }; + + homelab = { + audiobookshelf.enable = true; + beaverhabits.enable = true; + forgejo.enable = true; + freshrss.enable = true; + gitea.enable = true; + immich.enable = true; + jellyfin.enable = true; + paperless.enable = true; + pihole.enable = true; + tubearchivist-container.enable = true; + vaultwarden.enable = true; + }; + }; + + imports = [ + ../common + ../../users/opdavies + + ./configuration.nix + ./secrets.nix + ./extra.nix + ]; +} diff --git a/nix/hosts/nixedo/extra.nix b/nix/hosts/nixedo/extra.nix new file mode 100644 index 0000000..0218882 --- /dev/null +++ b/nix/hosts/nixedo/extra.nix @@ -0,0 +1,9 @@ +{ + programs.dconf.enable = true; + + services.logind.lidSwitchExternalPower = "ignore"; + + age.identityPaths = [ + "/home/opdavies/.ssh/id_rsa" + ]; +} diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index aca3496..399816b 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -8,21 +8,8 @@ { imports = [ ./hardware-configuration.nix - - ../common - ../../users/opdavies - ]; - features = { - desktop = { - autorandr.enable = true; - gaming.enable = true; - i3.enable = true; - peek.enable = true; - }; - }; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; boot = { diff --git a/nix/hosts/t490/default.nix b/nix/hosts/t490/default.nix new file mode 100644 index 0000000..2d76c26 --- /dev/null +++ b/nix/hosts/t490/default.nix @@ -0,0 +1,17 @@ +{ + imports = [ + ../common + ../../users/opdavies + + ./configuration.nix + ]; + + features = { + desktop = { + autorandr.enable = true; + gaming.enable = true; + i3.enable = true; + peek.enable = true; + }; + }; +}