mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
Merge pull request #2952 from edwtjo/cups-syswide-clientconf
CUPS system wide client side remote printing.
This commit is contained in:
commit
8e968b18e4
@ -35,7 +35,7 @@ let
|
|||||||
bindir = pkgs.buildEnv {
|
bindir = pkgs.buildEnv {
|
||||||
name = "cups-progs";
|
name = "cups-progs";
|
||||||
paths = cfg.drivers;
|
paths = cfg.drivers;
|
||||||
pathsToLink = [ "/lib/cups" "/share/cups" "/bin" ];
|
pathsToLink = [ "/lib/cups" "/share/cups" "/bin" "/etc/cups" ];
|
||||||
postBuild = cfg.bindirCmds;
|
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 {
|
drivers = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
example = literalExample "[ pkgs.splix ]";
|
example = literalExample "[ pkgs.splix ]";
|
||||||
@ -124,6 +138,14 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ cups ];
|
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 ];
|
services.dbus.packages = [ cups ];
|
||||||
|
|
||||||
# Cups uses libusb to talk to printers, and does not use the
|
# Cups uses libusb to talk to printers, and does not use the
|
||||||
|
Loading…
Reference in New Issue
Block a user