Convert "printing", CUPS daemon
svn path=/nixos/branches/fix-style/; revision=14384
This commit is contained in:
parent
4d0761beb2
commit
d0733953e1
@ -479,18 +479,6 @@ in
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
printing = {
|
|
||||||
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "
|
|
||||||
Whether to enable printing support through the CUPS daemon.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
udev = {
|
udev = {
|
||||||
|
|
||||||
addFirmware = mkOption {
|
addFirmware = mkOption {
|
||||||
@ -1026,6 +1014,7 @@ in
|
|||||||
(import ../upstart-jobs/httpd.nix) # Apache httpd (probably this can be removed ?)
|
(import ../upstart-jobs/httpd.nix) # Apache httpd (probably this can be removed ?)
|
||||||
(import ../upstart-jobs/apache-httpd) # Apache httpd (new style).
|
(import ../upstart-jobs/apache-httpd) # Apache httpd (new style).
|
||||||
(import ../upstart-jobs/vsftpd.nix)
|
(import ../upstart-jobs/vsftpd.nix)
|
||||||
|
(import ../upstart-jobs/cupsd.nix) # CUPS printing daemon
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||||
|
@ -1,4 +1,26 @@
|
|||||||
{config, pkgs, modprobe}:
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
let
|
||||||
|
inherit (pkgs.lib) mkOption mkIf;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services = {
|
||||||
|
printing = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether to enable printing support through the CUPS daemon.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -7,6 +29,8 @@ let
|
|||||||
|
|
||||||
inherit (pkgs) cups;
|
inherit (pkgs) cups;
|
||||||
|
|
||||||
|
modprobe = config.system.sbin.modprobe;
|
||||||
|
|
||||||
|
|
||||||
# Here we can enable additional backends, filters, etc. that are not
|
# Here we can enable additional backends, filters, etc. that are not
|
||||||
# part of CUPS itself, e.g. the SMB backend is part of Samba. Since
|
# part of CUPS itself, e.g. the SMB backend is part of Samba. Since
|
||||||
@ -101,7 +125,14 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
|
||||||
|
mkIf config.services.pulseaudio.enable {
|
||||||
|
require = [
|
||||||
|
options
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
extraJobs = [{
|
||||||
name = "cupsd";
|
name = "cupsd";
|
||||||
|
|
||||||
extraPath = [cups];
|
extraPath = [cups];
|
||||||
@ -133,5 +164,6 @@ in
|
|||||||
|
|
||||||
respawn ${cups}/sbin/cupsd -c ${cupsdConfig} -F
|
respawn ${cups}/sbin/cupsd -c ${cupsdConfig} -F
|
||||||
'';
|
'';
|
||||||
|
}];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -166,12 +166,6 @@ let
|
|||||||
inherit (pkgs) glibc samba;
|
inherit (pkgs) glibc samba;
|
||||||
})
|
})
|
||||||
|
|
||||||
# CUPS (printing) daemon.
|
|
||||||
++ optional config.services.printing.enable
|
|
||||||
(import ../upstart-jobs/cupsd.nix {
|
|
||||||
inherit config pkgs modprobe;
|
|
||||||
})
|
|
||||||
|
|
||||||
# X Font Server
|
# X Font Server
|
||||||
++ optional config.services.xfs.enable
|
++ optional config.services.xfs.enable
|
||||||
(import ../upstart-jobs/xfs.nix {
|
(import ../upstart-jobs/xfs.nix {
|
||||||
|
Loading…
Reference in New Issue
Block a user