ark/hosts/default.nix
Timothy DeHerrera e93ac2f790
flake.nix: name flake inputs
The flake inputs can now be arbitrarily referenced from
hosts/default.nix as they are all passed into it. Any input not
declared at the top of hosts/default.nix can still be referenced
as args.<input>.
2020-01-03 18:27:52 -07:00

48 lines
897 B
Nix

args@{ home, nixpkgs, self, ... }:
let
utils = import ../lib/utils.nix { lib = nixpkgs.lib; };
inherit (utils)
recImport
;
inherit (builtins)
attrValues
;
config = this:
nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = let
core = ../profiles/core.nix;
global = {
networking.hostName = this;
nix.nixPath = [
"nixpkgs=${nixpkgs}"
"nixos-config=/etc/nixos/configuration.nix"
];
system.configurationRevision = self.rev;
nixpkgs.overlays = self.overlays;
};
local = import "${toString ./.}/${this}.nix";
in
attrValues self.nixosModules ++ [
core
global
local
home.nixosModules.home-manager
];
};
hosts =
recImport { dir = ./.; _import = config; };
in
hosts