1

Lib/NixOS: Add headless option to system generators

This commit is contained in:
2025-07-08 20:15:29 +02:00
parent b718825670
commit 996c2a8f2a
2 changed files with 5 additions and 2 deletions

View File

@ -163,6 +163,7 @@
inherit system mylib;
hostname = "nixinator";
username = "christoph";
headless = false;
extraModules = [
# TODO:
# inputs.nix-topology.nixosModules.default
@ -172,6 +173,7 @@
inherit system mylib;
hostname = "nixtop";
username = "christoph";
headless = false;
extraModules = [
# TODO:
# inputs.nix-topology.nixosModules.default

View File

@ -10,12 +10,13 @@
hostname,
username,
extraModules ? [],
headless ? false,
}:
lib.nixosSystem {
inherit system;
# Values in "specialArgs" are propagated to all system modules.
specialArgs = {inherit inputs hostname mylib system username;};
specialArgs = {inherit inputs hostname mylib system username headless;};
modules = builtins.concatLists [
[
@ -35,7 +36,7 @@
{
home-manager = {
# Values in "extraSpecialArgs" are propagated to all HM modules.
extraSpecialArgs = {inherit inputs system hostname username mylib;};
extraSpecialArgs = {inherit inputs system hostname username mylib headless;};
# Use the "pkgs" from the system configuration.
# This disables "nixpkgs.*" options in HM modules.