devmon: Non-root user, set PATH, require udisks2
devmon refuses to run as root. Instead, we now run it as a user service, and enable udisks2 in order to perform the mounts.
This commit is contained in:
parent
1f27976e03
commit
013b848346
@ -18,11 +18,13 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.services.devmon = {
|
systemd.user.services.devmon = {
|
||||||
description = "devmon automatic device mounting daemon";
|
description = "devmon automatic device mounting daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
path = [ pkgs.udevil ];
|
path = [ pkgs.udevil pkgs.procps pkgs.udisks2 pkgs.which ];
|
||||||
serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
|
serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.udisks2.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user