diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2022-06-20 13:17:03 +0000 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-06-20 13:17:03 +0000 |
commit | 0416e7a115c7094a436d326e16e64720df68aa14 (patch) | |
tree | 63f15f82e1c2e75e3f03387487b58d45904dfddb /hosts/default.nix | |
parent | Update (diff) | |
download | nixos-config-0416e7a115c7094a436d326e16e64720df68aa14.tar.gz nixos-config-0416e7a115c7094a436d326e16e64720df68aa14.tar.bz2 nixos-config-0416e7a115c7094a436d326e16e64720df68aa14.zip |
Add VM host
Diffstat (limited to 'hosts/default.nix')
-rw-r--r-- | hosts/default.nix | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 83fb4c2..bd6dccb 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -15,26 +15,28 @@ let inherit (nixpkgs.lib); secrets = import ../secrets; + + mkHost = hostname: lib.nixosSystem { + inherit system; + specialArgs = { inherit pkgs inputs user secrets hostname; }; + modules = [ + ./configuration.nix + ./${hostname} + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; }; + home-manager.users.${user} = { + imports = [ ./home.nix ] ++ [ (import ./${ hostname }/home.nix) ]; + }; + } + ]; + }; +in +let hosts = [ "baitinq" "vm" ]; #TODO: generate from here. List to set + apply func in { - phobos = - let hostname = "phobos"; - in - lib.nixosSystem { - inherit system; - specialArgs = { inherit pkgs inputs user secrets hostname; }; - modules = [ - ./configuration.nix - ./phobos - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; }; - home-manager.users.${user} = { - imports = [ ./home.nix ] ++ [ (import ./${ hostname }/home.nix) ]; - }; - } - ]; - }; + baitinq = mkHost "baitinq"; + vm = mkHost "vm"; } |