24 lines
601 B
Nix
24 lines
601 B
Nix
|
let
|
||
|
hosts = {
|
||
|
hainich = {
|
||
|
ssh.host = "hainich.hacc.space";
|
||
|
channel = "nixos-unstable";
|
||
|
groups = [ "server" "hacc" ];
|
||
|
};
|
||
|
nixda = {
|
||
|
ssh.host = "nixda.hacc.space";
|
||
|
channel = "nixos-20.09";
|
||
|
groups = [ "server" "hacc" "live" ];
|
||
|
};
|
||
|
};
|
||
|
pkgs = import <nixpkgs> {};
|
||
|
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
|
||
|
lib = pkgs.lib;
|
||
|
in lib.mapAttrs (name: host: host // {
|
||
|
config = if (host ? config) then host.config else (evalConfig {
|
||
|
modules = [
|
||
|
(import "${toString ./.}/${name}/configuration.nix")
|
||
|
];
|
||
|
}).config;
|
||
|
}) hosts
|