profiles: printing: setup default paper size
This commit is contained in:
parent
0b7257cfb9
commit
c6b3325269
|
@ -6,6 +6,23 @@ in
|
||||||
options.my.profiles.printing = with lib; {
|
options.my.profiles.printing = with lib; {
|
||||||
enable = mkEnableOption "printing profile";
|
enable = mkEnableOption "printing profile";
|
||||||
|
|
||||||
|
papersize = mkOption {
|
||||||
|
type = with types; either str (enum [
|
||||||
|
"a3"
|
||||||
|
"a4"
|
||||||
|
"a5"
|
||||||
|
"b5"
|
||||||
|
"letter"
|
||||||
|
"legal"
|
||||||
|
"executive"
|
||||||
|
"note"
|
||||||
|
"11x17"
|
||||||
|
]);
|
||||||
|
default = "a4";
|
||||||
|
example = "paper";
|
||||||
|
description = "preferred paper size";
|
||||||
|
};
|
||||||
|
|
||||||
usb = {
|
usb = {
|
||||||
enable = my.mkDisableOption "USB printers";
|
enable = my.mkDisableOption "USB printers";
|
||||||
};
|
};
|
||||||
|
@ -31,6 +48,11 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Setup paper size
|
||||||
|
systemd.services.cups.serviceConfig.Environment = [
|
||||||
|
"PAPERSIZE=${cfg.papersize}"
|
||||||
|
];
|
||||||
|
|
||||||
# Allow using USB printers
|
# Allow using USB printers
|
||||||
services.ipp-usb = lib.mkIf cfg.usb.enable {
|
services.ipp-usb = lib.mkIf cfg.usb.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue