aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/optional/services
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-11-22 15:46:36 -0800
committerMark Nipper <nipsy@bitgnome.net>2024-11-22 15:46:36 -0800
commit97134b4bb89064aac2f930f0ba7afdc34f08afa3 (patch)
treeb00c486cf3ca7197ef47cabb289b655d085f41b6 /hosts/common/optional/services
parentd1bc83b88ff12912a71fd63b8743cd1643655631 (diff)
downloadnix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar.gz
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar.bz2
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar.lz
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar.xz
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.tar.zst
nix-97134b4bb89064aac2f930f0ba7afdc34f08afa3.zip
Fix conditional syntax
Diffstat (limited to '')
-rw-r--r--hosts/common/optional/services/tlp.nix29
1 files changed, 15 insertions, 14 deletions
diff --git a/hosts/common/optional/services/tlp.nix b/hosts/common/optional/services/tlp.nix
index 64f1960..f13a7b3 100644
--- a/hosts/common/optional/services/tlp.nix
+++ b/hosts/common/optional/services/tlp.nix
@@ -1,17 +1,18 @@
{config, lib, ...}:
{
- services.tlp = lib.mkIf ((builtins.match "^(jupiter|neptune|saturn|uranus)$" config.networking.hostName) != null) {
- enable = true;
- settings = {
- START_CHARGE_THRESH_BAT0 = 40;
- STOP_CHARGE_THRESH_BAT0 = 50;
- };
- };
-
- services.tlp = lib.mkIf (config.networking.hostName == "ginaz") {
- enable = true;
- settings = {
- STOP_CHARGE_THRESH_BAT0 = 1;
- };
- };
+ services.tlp = lib.mkMerge [
+ (lib.mkIf ((builtins.match "^(jupiter|neptune|saturn|uranus)$" config.networking.hostName) != null) {
+ enable = true;
+ settings = {
+ START_CHARGE_THRESH_BAT0 = 40;
+ STOP_CHARGE_THRESH_BAT0 = 50;
+ };
+ })
+ (lib.mkIf (config.networking.hostName == "ginaz") {
+ enable = true;
+ settings = {
+ STOP_CHARGE_THRESH_BAT0 = 1;
+ };
+ })
+ ];
}