From 30f336f05bb88abc1d72e93695a04f47b54c6c33 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 8 Jan 2025 08:54:14 +0000 Subject: [PATCH] Merge default.nix files into configuration.nix --- flake.nix | 8 +++---- nix/hosts/PW05CH3L/configuration.nix | 22 +++++++++++++++++++- nix/hosts/PW05CH3L/default.nix | 23 --------------------- nix/hosts/lemp11/configuration.nix | 23 +++++++++++++++++++++ nix/hosts/lemp11/default.nix | 31 ---------------------------- nix/hosts/nixedo/configuration.nix | 28 ++++++++++++++++++++++++- nix/hosts/nixedo/default.nix | 29 -------------------------- nix/hosts/nixedo/extra.nix | 5 ----- nix/hosts/t490/configuration.nix | 23 +++++++++++++++------ nix/hosts/t490/default.nix | 21 ------------------- 10 files changed, 92 insertions(+), 121 deletions(-) delete mode 100644 nix/hosts/PW05CH3L/default.nix delete mode 100644 nix/hosts/lemp11/default.nix delete mode 100644 nix/hosts/nixedo/default.nix delete mode 100644 nix/hosts/nixedo/extra.nix delete mode 100644 nix/hosts/t490/default.nix diff --git a/flake.nix b/flake.nix index 8c4a036..d8b82ff 100644 --- a/flake.nix +++ b/flake.nix @@ -72,7 +72,7 @@ modules = [ agenix.nixosModules.default - ./nix/hosts/lemp11 + ./nix/hosts/lemp11/configuration.nix ]; }; @@ -86,7 +86,7 @@ modules = [ agenix.nixosModules.default - ./nix/hosts/nixedo + ./nix/hosts/nixedo/configuration.nix ]; }; @@ -101,7 +101,7 @@ nixos-hardware.nixosModules.common-gpu-intel nixos-hardware.nixosModules.lenovo-thinkpad-t490 - ./nix/hosts/t490 + ./nix/hosts/t490/configuration.nix ]; }; @@ -119,7 +119,7 @@ disko.nixosModules.disko nixos-wsl.nixosModules.default - ./nix/hosts/PW05CH3L + ./nix/hosts/PW05CH3L/configuration.nix ]; }; diff --git a/nix/hosts/PW05CH3L/configuration.nix b/nix/hosts/PW05CH3L/configuration.nix index ccc0d6e..b7f4cc2 100644 --- a/nix/hosts/PW05CH3L/configuration.nix +++ b/nix/hosts/PW05CH3L/configuration.nix @@ -1,6 +1,26 @@ -{ inputs, ... }: +{ inputs, username, ... }: { + imports = [ + ../common + ../../users/opdavies + + ./configuration.nix + ]; + + features = { + cli = { + docker.enable = true; + }; + }; + + wsl = { + enable = true; + defaultUser = username; + }; + + services.syncthing.enable = true; + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nix = { diff --git a/nix/hosts/PW05CH3L/default.nix b/nix/hosts/PW05CH3L/default.nix deleted file mode 100644 index aee6bd3..0000000 --- a/nix/hosts/PW05CH3L/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ username, ... }: - -{ - imports = [ - ../common - ../../users/opdavies - - ./configuration.nix - ]; - - features = { - cli = { - docker.enable = true; - }; - }; - - wsl = { - enable = true; - defaultUser = username; - }; - - services.syncthing.enable = true; -} diff --git a/nix/hosts/lemp11/configuration.nix b/nix/hosts/lemp11/configuration.nix index 478bc2b..469f702 100644 --- a/nix/hosts/lemp11/configuration.nix +++ b/nix/hosts/lemp11/configuration.nix @@ -15,10 +15,33 @@ ./hardware-configuration.nix + ../common + ../../users/opdavies ../../users/eric ../../users/luke ]; + features = { + cli = { + docker.enable = true; + }; + + desktop = { + autorandr.enable = true; + gaming.enable = true; + peek.enable = true; + }; + + homelab = { + gitea.enable = true; + immich.enable = true; + jellyfin.enable = true; + paperless.enable = true; + pihole.enable = true; + tubearchivist-container.enable = true; + }; + }; + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # Bootloader. diff --git a/nix/hosts/lemp11/default.nix b/nix/hosts/lemp11/default.nix deleted file mode 100644 index 83a8cb0..0000000 --- a/nix/hosts/lemp11/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ ... }: - -{ - features = { - cli = { - docker.enable = true; - }; - - desktop = { - autorandr.enable = true; - gaming.enable = true; - peek.enable = true; - }; - - homelab = { - 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 635a22f..dc0dd76 100644 --- a/nix/hosts/nixedo/configuration.nix +++ b/nix/hosts/nixedo/configuration.nix @@ -7,10 +7,36 @@ { imports = [ ./hardware-configuration.nix - + ./secrets.nix ./modules/acme.nix + + ../common + ../../users/opdavies ]; + features = { + cli = { + docker.enable = true; + }; + + homelab = { + audiobookshelf.enable = true; + beaverhabits.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; + }; + }; + + programs.dconf.enable = true; + + services.logind.lidSwitchExternalPower = "ignore"; + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; boot.loader = { diff --git a/nix/hosts/nixedo/default.nix b/nix/hosts/nixedo/default.nix deleted file mode 100644 index a598cf9..0000000 --- a/nix/hosts/nixedo/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - features = { - cli = { - docker.enable = true; - }; - - homelab = { - audiobookshelf.enable = true; - beaverhabits.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 deleted file mode 100644 index b4e5242..0000000 --- a/nix/hosts/nixedo/extra.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.dconf.enable = true; - - services.logind.lidSwitchExternalPower = "ignore"; -} diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index 069fd65..ca07106 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -1,15 +1,26 @@ -{ - inputs, - pkgs, - username, - ... -}: +{ inputs, pkgs, ... }: { imports = [ ./hardware-configuration.nix + ./hardware.nix + ./programs.nix + ./services + ./users.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 deleted file mode 100644 index 7b497fe..0000000 --- a/nix/hosts/t490/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - imports = [ - ../common - ../../users/opdavies - - ./configuration.nix - ./hardware.nix - ./programs.nix - ./services - ./users.nix - ]; - - features = { - desktop = { - autorandr.enable = true; - gaming.enable = true; - i3.enable = true; - peek.enable = true; - }; - }; -}