diff options
Diffstat (limited to 'hosts/default.nix')
| -rw-r--r-- | hosts/default.nix | 68 |
1 files changed, 16 insertions, 52 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 4cd0381..1eafe16 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,25 +1,16 @@ { inputs, + myLib, self, withSystem, ... -}: let - inherit (import ./profiles.nix {inherit inputs self;}) personal server; - - mkNixOS = { - name, - modules ? profile.modules, - profile ? personal, - system ? profile.system, - specialArgs ? profile.specialArgs, - }: - profile.builder { - inherit specialArgs system; - modules = [./${name}] ++ modules ++ profile.modules; - }; -in { +}: { flake = { - nixosConfigurations = { + nixosConfigurations = let + inherit (myLib.my) mkNixOS; + + profiles = import ./profiles.nix {inherit self inputs;}; + in { glados = mkNixOS { name = "glados"; modules = with inputs; [ @@ -28,62 +19,35 @@ in { nixos-hardware.nixosModules.common-pc-ssd lanzaboote.nixosModules.lanzaboote ]; + profile = profiles.personal; }; glados-wsl = mkNixOS { name = "glados-wsl"; modules = [inputs.nixos-wsl.nixosModules.wsl]; + profile = profiles.personal; }; atlas = mkNixOS { name = "atlas"; - modules = [ - inputs.hercules-ci-agent.nixosModules.agent-service - - { - getchoo.server = { - secrets.enable = true; - services.hercules-ci = { - enable = true; - secrets.enable = true; - }; - }; - } - ]; - system = "aarch64-linux"; - profile = server; + profile = profiles.server; }; p-body = mkNixOS { name = "p-body"; - modules = with inputs; [ - hercules-ci-agent.nixosModules.agent-service - guzzle_api.nixosModules.guzzle_api - - { - getchoo.server = { - secrets.enable = true; - services.hercules-ci = { - enable = true; - secrets.enable = true; - }; - }; - } - ]; - + modules = [inputs.guzzle_api.nixosModules.guzzle_api]; system = "x86_64-linux"; - profile = server; + profile = profiles.server; }; }; nixosModules.getchoo = import ../modules/nixos; - # openwrt-imagebuilder seems to only work - # on x64 - packages.x86_64-linux.turret = - withSystem "x86_64-linux" - (s: s.pkgs.callPackage ./turret {inherit (inputs) openwrt-imagebuilder;}); + packages.x86_64-linux.turret = withSystem "x86_64-linux" ({pkgs, ...}: + pkgs.callPackage ./turret { + inherit (inputs) openwrt-imagebuilder; + }); }; perSystem = {system, ...}: { |
