From 630934a2631d9429b4e46c1b6ec0f6640f332384 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 22 May 2023 02:35:15 -0400 Subject: !hercules-ci -> hydra --- lib/configs.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/configs.nix (limited to 'lib/configs.nix') diff --git a/lib/configs.nix b/lib/configs.nix new file mode 100644 index 0000000..8da37bc --- /dev/null +++ b/lib/configs.nix @@ -0,0 +1,37 @@ +inputs: { + mkNixOS = { + name, + profile, + modules ? profile.modules, + system ? profile.system, + specialArgs ? profile.specialArgs, + }: + profile.builder { + inherit specialArgs system; + modules = + [../hosts/${name}] + ++ ( + if modules == profile.modules + then modules + else modules ++ profile.modules + ); + }; + + mkHMUser = { + name, + modules ? [], + pkgs ? import inputs.nixpkgs {system = "x86_64-linux";}, + extraSpecialArgs ? inputs, + }: + inputs.home-manager.lib.homeManagerConfiguration { + inherit pkgs extraSpecialArgs; + modules = + [ + { + programs.home-manager.enable = true; + } + ] + ++ [../users/${name}/home.nix] + ++ modules; + }; +} -- cgit v1.2.3