50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{
|
|
description = "Fudo Host Configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-21.05";
|
|
|
|
fudo-home.url = "path:./nix-home";
|
|
|
|
fudo-secrets.url = "path:/state/secrets";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, fudo-secrets, fudo-home, ... }: {
|
|
|
|
nixosConfigurations = let
|
|
lib = nixpkgs.lib;
|
|
|
|
hostlib = import ./lib/hosts.nix { inherit lib; };
|
|
|
|
hosts = lib.filterAttrs (hostname: hostOpts:
|
|
hostOpts.nixos-system) (hostlib.base-host-config ./config/hosts);
|
|
|
|
build-timestamp = self.sourceInfo.lastModified;
|
|
in lib.mapAttrs (hostname: hostOpts: let
|
|
pkgs = import nixpkgs {
|
|
system = hostOpts.arch;
|
|
config = {
|
|
allowUnfree = true;
|
|
permittedInsecurePackages = [
|
|
"openssh-with-gssapi-8.4p1"
|
|
];
|
|
};
|
|
overlays = [
|
|
(import ./fudo-pkgs/overlay.nix)
|
|
(import ./lib/overlay.nix)
|
|
];
|
|
};
|
|
in lib.nixosSystem {
|
|
system = hostOpts.arch;
|
|
|
|
modules = [
|
|
fudo-home.nixosModule
|
|
fudo-secrets.nixosModule
|
|
(import ./initialize.nix {
|
|
inherit hostname lib pkgs build-timestamp fudo-secrets;
|
|
})
|
|
];
|
|
}) hosts;
|
|
};
|
|
}
|