Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e26c2baeaef6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d5c639c545fe
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 30, 2019

  1. nixos/geoclue: minor cleanups

     - spawn the geoclue-agent directly instead of running it via bash
     - document why we cannot use DynamicUser = true
     - have systemd create the home directory instead of using an explicit
       tmpfiles.d fragment
    peterhoeg committed Oct 30, 2019
    Copy the full SHA
    d7ebe00 View commit details

Commits on Oct 31, 2019

  1. Copy the full SHA
    0838d6d View commit details
  2. Merge pull request #72281 from peterhoeg/f/geoclue

    nixos/geoclue: minor cleanups
    worldofpeace authored Oct 31, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5c639c View commit details
Showing with 25 additions and 16 deletions.
  1. +25 −16 nixos/modules/services/desktops/geoclue2.nix
41 changes: 25 additions & 16 deletions nixos/modules/services/desktops/geoclue2.nix
Original file line number Diff line number Diff line change
@@ -188,34 +188,41 @@ in

systemd.packages = [ package ];

users.users.geoclue = {
isSystemUser = true;
home = "/var/lib/geoclue";
group = "geoclue";
description = "Geoinformation service";
};

users.groups.geoclue = {};
# we cannot use DynamicUser as we need the the geoclue user to exist for the dbus policy to work
users = {
users.geoclue = {
isSystemUser = true;
home = "/var/lib/geoclue";
group = "geoclue";
description = "Geoinformation service";
};

systemd.tmpfiles.rules = [
"d /var/lib/geoclue 0755 geoclue geoclue"
];
groups.geoclue = {};
};

# restart geoclue service when the configuration changes
systemd.services.geoclue.restartTriggers = [
config.environment.etc."geoclue/geoclue.conf".source
];
systemd.services.geoclue = {
# restart geoclue service when the configuration changes
restartTriggers = [
config.environment.etc."geoclue/geoclue.conf".source
];
serviceConfig.StateDirectory = "geoclue";
};

# this needs to run as a user service, since it's associated with the
# user who is making the requests
systemd.user.services = mkIf cfg.enableDemoAgent {
geoclue-agent = {
description = "Geoclue agent";
script = "${package}/libexec/geoclue-2.0/demos/agent";
# this should really be `partOf = [ "geoclue.service" ]`, but
# we can't be part of a system service, and the agent should
# be okay with the main service coming and going
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "exec";
ExecStart = "${package}/libexec/geoclue-2.0/demos/agent";
Restart = "on-failure";
PrivateTmp = true;
};
};
};

@@ -256,4 +263,6 @@ in
};
} // mapAttrs' appConfigToINICompatible cfg.appConfig);
};

meta.maintainers = with lib.maintainers; [ worldofpeace ];
}