ark/hosts/default.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

2021-02-10 05:54:41 +03:00
inputs@{ home, impermanence, mynex, nixpkgs, self, pkgs, system, ... }:
2020-11-21 23:54:07 +03:00
let
utils = import ../lib/utils.nix { inherit lib pkgs; };
inherit (nixpkgs) lib;
inherit (utils) recImport;
config = hostName:
lib.nixosSystem {
inherit system;
specialArgs = {
usr = { inherit utils; };
util = utils;
nixosPersistence = "${impermanence}/nixos.nix";
};
2020-12-23 19:54:51 +03:00
modules =
let
inherit (home.nixosModules) home-manager;
inherit (mynex.nixosModules) security networking;
core = ../profiles/core.nix;
global = {
networking.hostName = hostName;
2021-01-17 17:25:54 +03:00
nix = {
nixPath = [
"nixpkgs=${nixpkgs}"
"nixos-config=/etc/nixos/configuration.nix"
"nixpkgs-overlays=/etc/nixos/overlays"
];
binaryCachePublicKeys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
];
binaryCaches = [
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
];
};
2020-12-23 19:54:51 +03:00
nixpkgs = { inherit pkgs; };
};
local = import "${toString ./.}/${hostName}.nix";
in
[ core global local home-manager security networking ];
2020-11-21 23:54:07 +03:00
};
hosts = recImport {
dir = ./.;
_import = config;
};
2020-12-23 19:54:51 +03:00
in
hosts