Skip to content

Commit 2c55335

Browse files
committed
chore: home-manager: use the same merge approach as other implementations
1 parent 0f014c7 commit 2c55335

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

homeManagerModules/default.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
cfg = config.services.xremap;
1010
localLib = localFlake.localLib { inherit pkgs lib cfg; };
1111
inherit (localLib) mkExecStart configFile;
12-
inherit (lib) mkIf optionalAttrs;
12+
inherit (lib) mkIf mkMerge optionalAttrs;
1313
in
1414
{
1515
options.services.xremap = localLib.commonOptions;
@@ -20,11 +20,14 @@ in
2020
PartOf = [ "graphical-session.target" ];
2121
After = [ "graphical-session.target" ];
2222
};
23-
Service = {
24-
Type = "simple";
25-
ExecStart = mkExecStart configFile;
26-
Restart = "always";
27-
} // optionalAttrs cfg.debug { Environment = [ "RUST_LOG=debug" ]; };
23+
Service = mkMerge [
24+
{
25+
Type = "simple";
26+
ExecStart = mkExecStart configFile;
27+
Restart = "always";
28+
}
29+
(optionalAttrs cfg.debug { Environment = [ "RUST_LOG=debug" ]; })
30+
];
2831
Install.WantedBy = [ "graphical-session.target" ];
2932
};
3033
};

0 commit comments

Comments
 (0)