cups: Use systemd files provided by CUPS
This commit is contained in:
parent
252bc4a4b9
commit
e9cf6cd34f
@ -183,10 +183,10 @@ in
|
|||||||
# gets loaded, and then cups cannot access the printers.
|
# gets loaded, and then cups cannot access the printers.
|
||||||
boot.blacklistedKernelModules = [ "usblp" ];
|
boot.blacklistedKernelModules = [ "usblp" ];
|
||||||
|
|
||||||
systemd.services.cups =
|
systemd.packages = [ cups ];
|
||||||
{ description = "CUPS Printing Daemon";
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
systemd.services.cups =
|
||||||
|
{ wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "network.target" ];
|
wants = [ "network.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
@ -200,9 +200,6 @@ in
|
|||||||
mkdir -m 0755 -p ${cfg.tempDir}
|
mkdir -m 0755 -p ${cfg.tempDir}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig.Type = "forking";
|
|
||||||
serviceConfig.ExecStart = "@${cups}/sbin/cupsd cupsd";
|
|
||||||
|
|
||||||
restartTriggers =
|
restartTriggers =
|
||||||
[ config.environment.etc."cups/cups-files.conf".source
|
[ config.environment.etc."cups/cups-files.conf".source
|
||||||
config.environment.etc."cups/cupsd.conf".source
|
config.environment.etc."cups/cupsd.conf".source
|
||||||
|
@ -58,6 +58,19 @@ stdenv.mkDerivation {
|
|||||||
''
|
''
|
||||||
# Delete obsolete stuff that conflicts with cups-filters.
|
# Delete obsolete stuff that conflicts with cups-filters.
|
||||||
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
||||||
|
|
||||||
|
# Rename systemd files provided by CUPS
|
||||||
|
for f in $out/lib/systemd/system/*; do
|
||||||
|
substituteInPlace "$f" \
|
||||||
|
--replace "org.cups.cupsd" "cups" \
|
||||||
|
--replace "org.cups." ""
|
||||||
|
|
||||||
|
if [[ "$f" =~ .*cupsd\..* ]]; then
|
||||||
|
mv "$f" "''${f/org\.cups\.cupsd/cups}"
|
||||||
|
else
|
||||||
|
mv "$f" "''${f/org\.cups\./}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user