This commit is contained in:
nora 2025-08-01 18:35:15 +02:00
parent 09159584f3
commit 5874a94a21
3 changed files with 207 additions and 194 deletions

View file

@ -52,7 +52,7 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.nora = import ./home-manager/home.nix; home-manager.users.nora = import ./home-manager/laptop.nix;
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = { inherit inputs; };
} }
]; ];

7
home-manager/laptop.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./home.nix
];
is-laptop = true;
}

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
options.is-laptop = lib.mkEnableOption "whether the computer is a laptop";
config = {
home.file."${config.xdg.configHome}/waybar/config.jsonc" = { home.file."${config.xdg.configHome}/waybar/config.jsonc" = {
text = text =
builtins.toJSON { builtins.toJSON {
@ -24,7 +27,9 @@
"memory" "memory"
"tray" "tray"
] ++ ] ++
(if (config.networking.hostName == "scrap") then [ "battery" ] else [ ]) ++ (if (config.networking.hostName == "scrap") then
[ "network" "power-profiles-daemon" "battery" ]
else [ ]) ++
[ [
"custom/power" "custom/power"
]; ];
@ -211,4 +216,5 @@
} }
''; '';
}; };
};
} }