diff --git a/flake.nix b/flake.nix index 76fead0..7ba738c 100644 --- a/flake.nix +++ b/flake.nix @@ -133,85 +133,41 @@ nixos-pulse = import ./systems/nixos-pulse/disko.nix; nixos-he4 = import ./systems/nixos-he4/disko.nix; }; - nixosConfigurations = { - nixos-he4 = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = args; - modules = - [ - ./systems/nixos-he4 - { - nixpkgs.pkgs = pkgs; - nix.registry.nixpkgs.flake = nixpkgs; - home-manager.sharedModules = hmModules; - home-manager.extraSpecialArgs = args; - } - ] - ++ osModules; - }; - nixos-pulse = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = args; - modules = - [ - ./systems/nixos-pulse - { - nixpkgs.pkgs = pkgs; - nix.registry.nixpkgs.flake = nixpkgs; - home-manager.sharedModules = hmModules; - home-manager.extraSpecialArgs = args; - } - ] - ++ osModules; - }; - nixos-desk = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = args; - modules = - [ - ./systems/nixos-desk - { - nixpkgs.pkgs = pkgs; - nix.registry.nixpkgs.flake = nixpkgs; - home-manager.sharedModules = hmModules; - home-manager.extraSpecialArgs = args; - } - { - _module.args.nixinate = { - host = "100.64.0.3"; - sshUser = "tristand"; - buildOn = "remote"; # valid args are "local" or "remote" - substituteOnTarget = false; # if buildOn is "local" then it will substitute on the target, "-s" - hermetic = false; - }; - } - ] - ++ osModules; - }; - nixos-karl-kvm-guest = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = args; - modules = - [ - ./systems/nixos-karl-kvm-guest - { - nixpkgs.pkgs = pkgs; - nix.registry.nixpkgs.flake = nixpkgs; - home-manager.sharedModules = hmModules; - home-manager.extraSpecialArgs = args; - } - { - _module.args.nixinate = { - host = "nixos-karl-kvm-guest.oekonzept.de"; - sshUser = "reopen5194"; - buildOn = "remote"; # valid args are "local" or "remote" - substituteOnTarget = false; # if buildOn is "local" then it will substitute on the target, "-s" - hermetic = false; - }; - } - ] - ++ osModules; - }; - }; + nixosConfigurations = nixpkgs.lib.attrsets.mergeAttrsList ( + nixpkgs.lib.lists.forEach [ + "nixos-desk" + "nixos-he4" + "nixos-karl-kvm-guest" + "nixos-pulse" + "nixos-fw16" + ] + (host: { + "${host}" = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = args; + modules = + [ + ./systems/${host} + { + nixpkgs.pkgs = pkgs; + nix.registry.nixpkgs.flake = nixpkgs; + home-manager.sharedModules = hmModules; + home-manager.extraSpecialArgs = args; + } + ] + ++ osModules; + }; + }) + ); + # { + # _module.args.nixinate = { + # host = "100.64.0.3"; + # sshUser = "tristand"; + # buildOn = "remote"; # valid args are "local" or "remote" + # substituteOnTarget = false; # if buildOn is "local" then it will substitute on the target, "-s" + # hermetic = false; + # }; + # } + # }; }; }