diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-08-13 10:12:52 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-08-13 22:05:09 +0200 |
commit | 7d414a064658a7fb87db94ca3d4a34e868c850d6 (patch) | |
tree | fee9cdb04d4db2be3e9d04ff6f50a7f4cec89faf /nixos/modules | |
parent | bc9bd5c02c38d6c5ae5b2e62fd0fe21c767413c7 (diff) | |
download | nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar.gz nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar.bz2 nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar.lz nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar.xz nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.tar.zst nixlib-7d414a064658a7fb87db94ca3d4a34e868c850d6.zip |
nixos: add services.printing.snmpConf option
And set the default value to "Address @LOCAL". This change is needed to find printers at my workplace (with "lpinfo -v" or the "system-config-printer" GUI). Ubuntu 14.04 also has this as default. snmp.conf does not seem to be needed in restartTriggers, because it is not the cups daemon itself that reads it, but some helper programs that it spawns on demand.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/printing/cupsd.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index e743aa8a3236..69c76cf97cfd 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -160,6 +160,17 @@ in ''; }; + snmpConf = mkOption { + type = types.lines; + default = '' + Address @LOCAL + ''; + description = '' + The contents of <filename>/etc/cups/snmp.conf</filename>. See "man + cups-snmp.conf" for a complete description. + ''; + }; + drivers = mkOption { type = types.listOf types.path; example = literalExample "[ pkgs.splix ]"; @@ -199,6 +210,7 @@ in environment.etc."cups/cups-files.conf".text = cfg.cupsFilesConf; environment.etc."cups/cupsd.conf".text = cfg.cupsdConf; environment.etc."cups/cups-browsed.conf".text = cfg.browsedConf; + environment.etc."cups/snmp.conf".text = cfg.snmpConf; services.dbus.packages = [ cups ]; |