2021-01-22 05:07:01 +03:00
|
|
|
inputs@{ home, impermanence, mynex, nixpkgs, self, pkgs, lldbPkgs, 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 = {
|
2021-01-22 05:07:01 +03:00
|
|
|
inherit lldbPkgs;
|
2020-11-21 23:54:07 +03:00
|
|
|
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
|