30 lines
586 B
Nix
30 lines
586 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.services.ntnuPrinting;
|
|
in
|
|
{
|
|
options.services.ntnuPrinting.enable = lib.mkEnableOption "Enable NTNU printing service";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.printing.enable = true;
|
|
services.printing.browsed.enable = true;
|
|
|
|
hardware.printers.ensurePrinters = [
|
|
{
|
|
name = "NTNU-Print";
|
|
location = "NTNU";
|
|
deviceUri = "https://myprint.ntnu.no/RicohmyPrint/printers/ipp/print";
|
|
model = "myPrint_PS.ppd";
|
|
ppdOptions = {
|
|
PageSize = "A4";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
}
|