diff options
author | Edward Tjörnhammar <ed@cflags.cc> | 2014-06-11 21:52:53 +0200 |
---|---|---|
committer | Edward Tjörnhammar <ed@cflags.cc> | 2014-08-20 18:48:42 +0200 |
commit | f28d8c2dc43fc14598f4ecbea2cba3974263a278 (patch) | |
tree | c7c4e54354e6a32e610eda424e2908c3a056deae /nixos/modules/services/printing | |
parent | d95ae1cc89479e40fd1330a853dc0de7b17c1060 (diff) | |
download | nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar.gz nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar.bz2 nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar.lz nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar.xz nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.tar.zst nixlib-f28d8c2dc43fc14598f4ecbea2cba3974263a278.zip |
CUPS system wide client configuration.
Diffstat (limited to 'nixos/modules/services/printing')
-rw-r--r-- | nixos/modules/services/printing/cupsd.nix | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index d229c610669f..8a8085cad280 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -35,7 +35,7 @@ let bindir = pkgs.buildEnv { name = "cups-progs"; paths = cfg.drivers; - pathsToLink = [ "/lib/cups" "/share/cups" "/bin" ]; + pathsToLink = [ "/lib/cups" "/share/cups" "/bin" "/etc/cups" ]; postBuild = cfg.bindirCmds; }; @@ -89,6 +89,20 @@ in ''; }; + clientConf = mkOption { + type = types.lines; + default = ""; + example = + '' + ServerName server.example.com + Encryption Never + ''; + description = '' + The contents of the client configuration. + (<filename>client.conf</filename>) + ''; + }; + drivers = mkOption { type = types.listOf types.path; example = literalExample "[ pkgs.splix ]"; @@ -124,6 +138,14 @@ in environment.systemPackages = [ cups ]; + environment.variables.CUPS_SERVERROOT = "/etc/cups"; + + environment.etc = [ + { source = pkgs.writeText "client.conf" cfg.clientConf; + target = "cups/client.conf"; + } + ]; + services.dbus.packages = [ cups ]; # Cups uses libusb to talk to printers, and does not use the |