nixos/colord: don't run as root
Using systemd.packages because there's a system colord service and colord-session user service included.
This commit is contained in:
parent
8137fa520b
commit
f22fbe1175
|
@ -18,22 +18,23 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.colord ];
|
||||
|
||||
services.dbus.packages = [ pkgs.colord ];
|
||||
|
||||
services.udev.packages = [ pkgs.colord ];
|
||||
|
||||
environment.systemPackages = [ pkgs.colord ];
|
||||
systemd.packages = [ pkgs.colord ];
|
||||
|
||||
systemd.services.colord = {
|
||||
description = "Manage, Install and Generate Color Profiles";
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.ColorManager";
|
||||
ExecStart = "${pkgs.colord}/libexec/colord";
|
||||
PrivateTmp = true;
|
||||
};
|
||||
environment.etc."tmpfiles.d/colord.conf".source = "${pkgs.colord}/lib/tmpfiles.d/colord.conf";
|
||||
|
||||
users.users.colord = {
|
||||
home = "/var/lib/colord";
|
||||
group = "colord";
|
||||
};
|
||||
|
||||
users.groups.colord = {};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ stdenv.mkDerivation rec {
|
|||
"-Dlibcolordcompat=true"
|
||||
"-Dsane=true"
|
||||
"-Dvapi=true"
|
||||
"-Ddaemon_user=colord"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
Loading…
Reference in a new issue