nixos-config/initialize.nix

31 lines
708 B
Nix
Raw Normal View History

2021-09-29 17:55:13 -07:00
{ hostname, pkgs, build-timestamp, fudo-secrets ? null, ... }:
2021-02-25 12:45:50 -08:00
let
2021-09-07 15:39:45 -07:00
# Get info on this host so we know what to load
host-config = import (./. + "/config/hosts/${hostname}.nix");
2021-09-07 15:39:45 -07:00
in {
2021-02-25 12:45:50 -08:00
imports = [
./lib
./config
2021-09-04 14:17:51 -07:00
2021-09-29 17:55:13 -07:00
#home-manager-module
2021-09-07 15:39:45 -07:00
2021-02-25 12:45:50 -08:00
(./. + "/config/hardware/${hostname}.nix")
(./. + "/config/host-config/${hostname}.nix")
(./. + "/config/profile-config/${host-config.profile}.nix")
(./. + "/config/domain-config/${host-config.domain}.nix")
(./. + "/config/site-config/${host-config.site}.nix")
2021-02-25 12:45:50 -08:00
];
2021-02-25 12:45:50 -08:00
config = {
2021-09-30 08:40:47 -07:00
instance = {
inherit hostname build-timestamp;
};
2021-07-20 18:28:12 -07:00
2021-09-07 15:39:45 -07:00
nixpkgs.pkgs = pkgs;
2021-09-29 17:55:13 -07:00
fudo.secrets.enable = fudo-secrets != null;
2021-02-25 12:45:50 -08:00
};
}