nixos-config/config/hosts.nix

19 lines
494 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
syslib = pkgs.callPackage ../lib/hosts.nix {};
in {
config.fudo.hosts = let
build-seed = config.instance.build-seed;
base-config = syslib.base-host-config ./hosts;
in mapAttrs (hostname: base-config:
base-config // {
backplane-password-file =
pkgs.lib.fudo.passwd.stablerandom-passwd-file
"${hostname}-host-backplane-passwd"
"${hostname}-host-backplane-passwd-${build-seed}";
}) base-config;
}