nixos-config/initialize.nix

24 lines
497 B
Nix
Raw Normal View History

{ lib, pkgs, hostname, site, domain, profile, build-timestamp, ... }:
2021-02-25 12:45:50 -08:00
with lib;
let
2021-11-17 17:32:27 -08:00
config-dir = ./config;
2021-10-04 12:23:46 -07:00
in {
2021-02-25 12:45:50 -08:00
imports = [
./config
] ++ (filter pathExists [
(config-dir + /hardware/${hostname}.nix)
(config-dir + /host-config/${hostname}.nix)
(config-dir + /profile-config/${profile}.nix)
(config-dir + /domain-config/${domain}.nix)
(config-dir + /site-config/${site}.nix)
]);
2021-02-25 12:45:50 -08:00
config = {
2021-09-30 08:40:47 -07:00
instance = {
2021-10-08 15:26:19 -07:00
inherit hostname build-timestamp;
2021-09-30 08:40:47 -07:00
};
2021-02-25 12:45:50 -08:00
};
}