feat(nixos): add desktop module with non-portable home-manager profile
CI / flake (pull_request) Successful in 2m17s
CI / flake (pull_request) Successful in 2m17s
Add system/modules/desktop.nix (counterpart to laptop.nix): imports the workstation base and uses wired NetworkManager instead of iwd. Thread a `portable` flag (default true) through mkHost into specialArgs and home-manager.extraSpecialArgs, mirroring username/fullName. lyrathorpe/home/ sway.nix consumes it to drop mobile components on desktop hosts: - status bar swaps the battery block for CPU temperature + network throughput - screen-brightness keybindings are omitted (no internal backlight) No host uses desktop.nix yet; a future desktop host imports it and sets `portable = false`. Verified by evaluating sway.nix both ways: laptop -> [.. sound battery time] + brightness keys; desktop -> [.. temperature net sound time], no brightness keys. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,16 +98,34 @@
|
||||
fullName,
|
||||
modules,
|
||||
homeModules,
|
||||
# Host form factor. Laptops inherit the default; a desktop host sets
|
||||
# `portable = false` to drop mobile components (battery block,
|
||||
# brightness keys) from the home-manager Sway config.
|
||||
portable ? true,
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs username fullName; };
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
username
|
||||
fullName
|
||||
portable
|
||||
;
|
||||
};
|
||||
modules =
|
||||
baseModules
|
||||
++ modules
|
||||
++ [
|
||||
{
|
||||
home-manager.extraSpecialArgs = { inherit inputs username fullName; };
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
username
|
||||
fullName
|
||||
portable
|
||||
;
|
||||
};
|
||||
home-manager.users.${username}.imports = homeModules;
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user