Merge pull request #58458 from worldofpeace/colord/no-root
nixos/colord: don't run as root
This commit is contained in:
commit
81e2fb5303
|
@ -18,22 +18,23 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.colord ];
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.colord ];
|
services.dbus.packages = [ pkgs.colord ];
|
||||||
|
|
||||||
services.udev.packages = [ pkgs.colord ];
|
services.udev.packages = [ pkgs.colord ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.colord ];
|
systemd.packages = [ pkgs.colord ];
|
||||||
|
|
||||||
systemd.services.colord = {
|
environment.etc."tmpfiles.d/colord.conf".source = "${pkgs.colord}/lib/tmpfiles.d/colord.conf";
|
||||||
description = "Manage, Install and Generate Color Profiles";
|
|
||||||
serviceConfig = {
|
users.users.colord = {
|
||||||
Type = "dbus";
|
home = "/var/lib/colord";
|
||||||
BusName = "org.freedesktop.ColorManager";
|
group = "colord";
|
||||||
ExecStart = "${pkgs.colord}/libexec/colord";
|
|
||||||
PrivateTmp = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.groups.colord = {};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ stdenv.mkDerivation rec {
|
||||||
"-Dlibcolordcompat=true"
|
"-Dlibcolordcompat=true"
|
||||||
"-Dsane=true"
|
"-Dsane=true"
|
||||||
"-Dvapi=true"
|
"-Dvapi=true"
|
||||||
|
"-Ddaemon_user=colord"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
Loading…
Reference in New Issue