From 996c2a8f2a6c99453cdbeb064514579e3d25c3c6 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Tue, 8 Jul 2025 20:15:29 +0200 Subject: [PATCH] Lib/NixOS: Add headless option to system generators --- flake.nix | 2 ++ lib/nixos.nix | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 877dba0c..8a45b2a2 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/lib/nixos.nix b/lib/nixos.nix index 55743eb8..7967a132 100644 --- a/lib/nixos.nix +++ b/lib/nixos.nix @@ -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.