summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorGavin John <gavinnjohn@gmail.com>2024-06-24 11:49:40 -0500
committerGavin John <>2024-06-24 14:36:26 -0500
commit8dcb12dee316aecb8d9a8e93ed403cf2efb5be83 (patch)
tree75aac8d80c37ee956bfddd1d59303525d7873807 /nixos/modules/services
parentb4eaf50471fa7fc828334a77141e3cd3f7e4601c (diff)
services/localtimed: Add package and geoclue2Package options
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";