43 lines
835 B
Nix
43 lines
835 B
Nix
{ inputs, build-timestamp, ... }:
|
|
|
|
hostname: hostOpts:
|
|
|
|
let
|
|
pkgs-for = system: import inputs.nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
permittedInsecurePackages = [
|
|
"openssh-with-gssapi-8.4p1"
|
|
];
|
|
overlays = [
|
|
(import (inputs.fudo-pkgs + /overlay.nix))
|
|
(import (inputs.fudo-nixos + /lib/overlay.nix))
|
|
];
|
|
};
|
|
};
|
|
|
|
host-ip =
|
|
inputs.fudo-entities.entities.zones.${hostOpts.domain}.hosts.${hostname}.ipv4-address;
|
|
|
|
in { config, ... }: {
|
|
modules = [
|
|
inputs.fudo-nixos.nixosConfigurations.${hostname}
|
|
];
|
|
|
|
imports = [
|
|
inputs.fudo-secrets.nixosModule
|
|
inputs.fudo-lib.nixosModule
|
|
];
|
|
|
|
nixpkgs.pkgs = pkgs-for hostOpts.arch;
|
|
|
|
instance = {
|
|
inherit hostname build-timestamp;
|
|
};
|
|
|
|
deployment = {
|
|
targetHost = host-ip;
|
|
};
|
|
}
|