home-manager: Use extraSpecialArgs for shared variables

Makes it possible to avoid inconsistencies with duplicate code.
This commit is contained in:
Donovan Glover 2024-07-06 10:55:50 -04:00
parent b004639ea3
commit 307a7fb543
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, vars, ... }:
let let
inherit (lib) singleton; inherit (lib) singleton;
@ -176,7 +176,7 @@ in
sleep 0.2 sleep 0.2
notify-send -t 2000 "Mullvad" "$(mullvad status | choose 2)" notify-send -t ${vars.notifications.duration} "Mullvad" "$(mullvad status | choose 2)"
''; '';
}; };

View File

@ -165,6 +165,14 @@ in
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
}; };
extraSpecialArgs = {
vars = {
notifications = {
duration = "2000";
};
};
};
}; };
virtualisation.vmVariant = { virtualisation.vmVariant = {