From fd5aae84b9c9a4911acb5a4ab290997b2da73ba7 Mon Sep 17 00:00:00 2001 From: sils Date: Wed, 2 Aug 2023 12:34:12 +0200 Subject: Refactor(flake): Declare defaultModules This eases adding of further hosts --- flake.nix | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 71459ec..5e99b1e 100644 --- a/flake.nix +++ b/flake.nix @@ -121,26 +121,29 @@ inherit system; overlays = [nixneovim.overlays.default]; }; - sysLib = shell_library.lib.${system}; + defaultModules = [ + impermanence.nixosModules.impermanence + lanzaboote.nixosModules.lanzaboote + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.sils = import ./users/sils; + extraSpecialArgs = {inherit pkgs system sysLib river_init_lesser yambar_cpu yambar_memory prismlauncher nixneovim impermanence;}; + }; + } + ]; in { nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem { inherit system; specialArgs = attrs; - modules = [ - impermanence.nixosModules.impermanence - lanzaboote.nixosModules.lanzaboote - ./hosts/thinklappi - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.sils = import ./users/sils; - extraSpecialArgs = {inherit pkgs system sysLib river_init_lesser yambar_cpu yambar_memory prismlauncher nixneovim impermanence;}; - }; - } - ]; + modules = + [ + ./hosts/thinklappi + ] + ++ defaultModules; }; devShells."${system}" = { default = pkgs.mkShell { -- cgit 1.4.1