nixos-config/initialize.nix

29 lines
686 B
Nix
Raw Normal View History

2021-09-07 15:39:45 -07:00
{ hostname, home-manager-module, pkgs, include-secrets ? true, ... }:
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-07 15:39:45 -07:00
home-manager-module
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 = {
instance = { hostname = hostname; };
2021-07-20 18:28:12 -07:00
2021-09-07 15:39:45 -07:00
nixpkgs.pkgs = pkgs;
2021-07-20 18:28:12 -07:00
fudo.secrets.enable = include-secrets;
2021-02-25 12:45:50 -08:00
};
}