Merge pull request #61729 from worldofpeace/geoclue/no-root
nixos/geoclue2: don't run as root
This commit is contained in:
commit
094e150804
@ -188,6 +188,19 @@ in
|
|||||||
|
|
||||||
systemd.packages = [ package ];
|
systemd.packages = [ package ];
|
||||||
|
|
||||||
|
users.users.geoclue = {
|
||||||
|
isSystemUser = true;
|
||||||
|
home = "/var/lib/geoclue";
|
||||||
|
group = "geoclue";
|
||||||
|
description = "Geoinformation service";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.geoclue = {};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /var/lib/geoclue 0755 geoclue geoclue"
|
||||||
|
];
|
||||||
|
|
||||||
# restart geoclue service when the configuration changes
|
# restart geoclue service when the configuration changes
|
||||||
systemd.services."geoclue".restartTriggers = [
|
systemd.services."geoclue".restartTriggers = [
|
||||||
config.environment.etc."geoclue/geoclue.conf".source
|
config.environment.etc."geoclue/geoclue.conf".source
|
||||||
|
@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
|
|||||||
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
|
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||||
|
"-Ddbus-srv-user=geoclue"
|
||||||
] ++ optionals stdenv.isDarwin [
|
] ++ optionals stdenv.isDarwin [
|
||||||
"-D3g-source=false"
|
"-D3g-source=false"
|
||||||
"-Dcdma-source=false"
|
"-Dcdma-source=false"
|
||||||
|
Loading…
Reference in New Issue
Block a user