diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-01-17 04:05:02 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-01-17 15:50:40 +0300 |
commit | d93f866f55adb6831e054e717253ee94071240b0 (patch) | |
tree | 76a349c4990f2b7fecd9154b5e43907f6125fd21 /nixos/modules/services/printing | |
parent | 8377b4e5d6e008ba528e54d0760f0aea7707d087 (diff) | |
download | nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar.gz nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar.bz2 nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar.lz nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar.xz nixlib-d93f866f55adb6831e054e717253ee94071240b0.tar.zst nixlib-d93f866f55adb6831e054e717253ee94071240b0.zip |
cupsd service: add gutenprint support
Diffstat (limited to 'nixos/modules/services/printing')
-rw-r--r-- | nixos/modules/services/printing/cupsd.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 06de71316ecc..5964b62cc214 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -4,7 +4,7 @@ with lib; let - inherit (pkgs) cups cups-pk-helper cups_filters; + inherit (pkgs) cups cups-pk-helper cups_filters gutenprint; cfg = config.services.printing; @@ -35,6 +35,7 @@ let name = "cups-progs"; paths = [ cups additionalBackends cups_filters pkgs.ghostscript ] + ++ optional cfg.gutenprint gutenprint ++ cfg.drivers; pathsToLink = [ "/lib/cups" "/share/cups" "/bin" "/etc/cups" ]; postBuild = cfg.bindirCmds; @@ -176,6 +177,15 @@ in ''; }; + gutenprint = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable Gutenprint drivers for CUPS. This includes auto-updating + Gutenprint PPD files. + ''; + }; + drivers = mkOption { type = types.listOf types.path; default = []; @@ -240,6 +250,9 @@ in mkdir -m 0700 -p /var/cache/cups mkdir -m 0700 -p /var/spool/cups mkdir -m 0755 -p ${cfg.tempDir} + ${optionalString cfg.gutenprint '' + ${gutenprint}/bin/cups-genppdupdate + ''} ''; restartTriggers = |