Start switch to nixos-facter

This commit is contained in:
Fern Garden 2025-08-23 17:00:28 +08:00
parent 891ce0ce17
commit 32c24866e9
3 changed files with 6485 additions and 14 deletions

View file

@ -11,7 +11,6 @@ with inputs.nixpkgs.lib; {
platform ? "x86_64-linux",
suite ? "",
docker ? false,
hostModules ? [],
}: let
# System architecture.
system = platform;
@ -21,8 +20,7 @@ with inputs.nixpkgs.lib; {
# Extra modules to import.
extraModules =
hostModules # Host-specific modules.
++ optionals (docker == true) [./suites/server/docker] # Enable docker if required.
optionals (docker == true) [./suites/server/docker] # Enable docker if required.
++ (filesystem.listFilesRecursive ./modules); # Custom modules.
# nixpkgs config.
@ -78,6 +76,10 @@ with inputs.nixpkgs.lib; {
lanzaboote.nixosModules.lanzaboote # Secure boot.
sops-nix.nixosModules.sops # Secrets management.
# Hardware configuration.
nixos-facter.nixosModules.facter
{config.facter.reportPath = ./hosts/${hostname}/facter.json;}
./suites/${suite} # Collection of configuration options for different types of systems.
./hosts/${hostname} # Host-specific config.