summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-06-27 12:58:20 +0200
committerGitHub <noreply@github.com>2024-06-27 12:58:20 +0200
commitf6fb5b4f20738b671c9ce9f613cfdaa1dfc32add (patch)
tree48ed17c02a6cc1c6d28cac448664234f27a68568 /nixos/modules/services
parent6e280f220caaf44acb47ea11db9e65efee7ecd65 (diff)
parent8dcb12dee316aecb8d9a8e93ed403cf2efb5be83 (diff)
Merge pull request #322216 from Pandapip1/patch-3
services/localtimed: Allow configuring packages
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/system/localtimed.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/system/localtimed.nix b/nixos/modules/services/system/localtimed.nix
index 8af22892a117..bd83d227aa35 100644
--- a/nixos/modules/services/system/localtimed.nix
+++ b/nixos/modules/services/system/localtimed.nix
@@ -18,6 +18,8 @@ in {
geoclue2 to determine the current location.
'';
};
+ package = mkPackageOption pkgs "localtime" { };
+ geoclue2Package = mkPackageOption pkgs "geoclue2-with-demo-agent" { };
};
};
@@ -29,14 +31,14 @@ in {
};
# Install the polkit rules.
- environment.systemPackages = [ pkgs.localtime ];
+ environment.systemPackages = [ cfg.package ];
systemd.services.localtimed = {
wantedBy = [ "multi-user.target" ];
partOf = [ "localtimed-geoclue-agent.service" ];
after = [ "localtimed-geoclue-agent.service" ];
serviceConfig = {
- ExecStart = "${pkgs.localtime}/bin/localtimed";
+ ExecStart = "${cfg.package}/bin/localtimed";
Restart = "on-failure";
Type = "exec";
User = "localtimed";
@@ -48,7 +50,7 @@ in {
partOf = [ "geoclue.service" ];
after = [ "geoclue.service" ];
serviceConfig = {
- ExecStart = "${pkgs.geoclue2-with-demo-agent}/libexec/geoclue-2.0/demos/agent";
+ ExecStart = "${cfg.geoclue2Package}/libexec/geoclue-2.0/demos/agent";
Restart = "on-failure";
Type = "exec";
User = "localtimed";