Add arch to hosts, share host config with flake.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user