nixos-config/flake.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

{
description = "Fudo Host Configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
2021-09-29 17:55:13 -07:00
2021-09-30 17:14:20 -07:00
fudo-home.url = "path:./nix-home";
2021-09-29 17:55:13 -07:00
fudo-secrets.url = "path:/state/secrets";
};
2021-09-30 17:14:20 -07:00
outputs = { self, nixpkgs, fudo-secrets, ... }: {
nixosConfigurations = let
2021-09-29 17:55:13 -07:00
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 {
2021-09-29 17:55:13 -07:00
system = hostOpts.arch;
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssh-with-gssapi-8.4p1"
];
};
overlays = [
(import ./fudo-pkgs/overlay.nix)
];
};
2021-09-29 17:55:13 -07:00
in lib.nixosSystem {
system = hostOpts.arch;
modules = [
2021-09-29 18:44:33 -07:00
fudo-secrets.nixosModule
2021-09-29 17:55:13 -07:00
(import ./initialize.nix {
inherit hostname pkgs build-timestamp fudo-secrets;
})
];
}) hosts;
};
}