mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
29 lines
711 B
Nix
29 lines
711 B
Nix
let
|
|
hosts = {
|
|
yule = {
|
|
ssh.host = "kat@yule";
|
|
groups = [ "desktop" "personal" ];
|
|
};
|
|
beltane = {
|
|
ssh.host = "kat@beltane";
|
|
groups = [ "server" "personal" ];
|
|
};
|
|
samhain = {
|
|
ssh.host = "kat@samhain";
|
|
groups = [ "desktop" "personal" ];
|
|
};
|
|
litha = {
|
|
ssh.host = "root@litha";
|
|
groups = [ "desktop" "personal" ];
|
|
};
|
|
};
|
|
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
|