From a6af2adb9c916893c7dfe38184afa0465eb7118c Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 23 May 2024 18:29:32 +0200 Subject: fix(flake/nixosConfigurations): Adapt to new module structure --- flake/nixosConfigurations/default.nix | 83 +++++++++++++++++++++++++++++++---- 1 file changed, 75 insertions(+), 8 deletions(-) (limited to 'flake/nixosConfigurations') diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index f2110eb9..3895593f 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -1,24 +1,91 @@ { + self, system, - pkgs, + myPkgs, nixpkgs_as_input, - # configs - defaultModules, - defaultSpecialArgs, - ... + nixpkgs_open_prs, + # my things + shell_library, + sysLib, + templates, + # modules + home-manager, + nixVim, + nixos-generators, + impermanence, + agenix, + ragenix, + serverphone, + disko, + lanzaboote, + nix-index-database, + # bins + river_init_lesser, + yambar_cpu, + yambar_memory, + # external + user_js, }: let + modules = [ + "${nixpkgs_open_prs.nixpkgs-tfc}/nixos/modules/config/xdg/portals/termfilechooser.nix" + + agenix.nixosModules.default + disko.nixosModules.default + home-manager.nixosModules.home-manager + impermanence.nixosModules.impermanence + lanzaboote.nixosModules.lanzaboote + serverphone.nixosModules.default + + # Deduplicate some code in the host files + ../../modules/system + ]; + + specialArgs = { + inherit + # extra package sources + nixpkgs_open_prs + myPkgs + shell_library + sysLib + # extra information + + system + # modules + + impermanence + nix-index-database + nixVim + # nix registry + + nixpkgs_as_input + self + templates + # bins + + # TODO: Integrate these into `pkgs/by-name` <2024-05-22> + + river_init_lesser + serverphone + yambar_cpu + yambar_memory + # external deps + + user_js + ; + }; + generateHost = name: { name = "${name}"; value = nixpkgs_as_input.lib.nixosSystem { - inherit system pkgs; - specialArgs = defaultSpecialArgs; + inherit specialArgs; modules = [ ../../hosts/${name} ] - ++ defaultModules; + ++ modules; }; }; + # FIXME: These need to stay in this position for the install script hosts = ["tiamat" "apzu"]; inactiveHosts = ["mammun" "lahmu"]; -- cgit 1.4.1