ark/hosts/default.nix
Timothy DeHerrera 6770621c70
utils: add to specialArgs
All the utility functions defined in lib/utils.nix are now easily
accessible via NixOS module arguements, i.e. `{ utils, ... }:`
2020-01-05 22:41:19 -07:00

43 lines
952 B
Nix

args@{ home, nixpkgs, self, ... }:
let
utils = import ../lib/utils.nix { lib = nixpkgs.lib; };
inherit (utils) recImport;
inherit (builtins) attrValues removeAttrs;
config = this:
nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit utils; };
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";
flakeModules = removeAttrs self.nixosModules [ "profiles" ];
in attrValues flakeModules
++ [ core global local home.nixosModules.home-manager ];
};
hosts = recImport {
dir = ./.;
_import = config;
};
in hosts