Add arch to hosts, share host config with flake.

This commit is contained in:
2021-09-24 11:31:56 -07:00
parent aaf5391557
commit c02318ca00
22 changed files with 121 additions and 13 deletions
+34
View File
@@ -0,0 +1,34 @@
{
description = "Fudo Host Configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
home-manager.url = "github:nix-community/home-manager/release-21.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }: {
nixosConfigurations = let
hostlib = import ./lib/hosts.nix { lib = nixpkgs.lib; };
hosts = hostlib.base-host-config ./config/hosts;
in nixpkgs.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)
];
};
in import ./initialize.nix {
inherit hostname pkgs;
home-manager-module = import "${home-manager}/nixos";
include-secrets = true;
}) hosts;
};
}