os/modules/printing/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
867 B
Nix
Raw Normal View History

2023-01-28 21:49:10 +01:00
{
lib,
config,
pkgs,
...
}:
with lib; let
2021-05-30 21:10:28 +02:00
psCfg = config.pub-solar;
cfg = config.pub-solar.printing;
2023-01-28 21:49:10 +01:00
in {
2021-05-30 21:10:28 +02:00
options.pub-solar.printing = {
enable = mkEnableOption "CUPSSSss";
};
config = mkIf cfg.enable {
services.avahi.enable = true;
services.avahi.nssmdns = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.printing.enable = true;
services.printing.browsing = true;
2023-01-28 21:49:10 +01:00
services.printing.listenAddresses = ["localhost:631"];
services.printing.allowFrom = ["all"];
2021-05-30 21:10:28 +02:00
services.printing.defaultShared = false;
2022-04-03 18:48:41 +02:00
services.printing.drivers = with pkgs; [
gutenprint
brgenml1lpr
brgenml1cupswrapper
brlaser
cnijfilter2
cups-brother-hl3140cw
2021-05-30 21:10:28 +02:00
];
hardware.sane = {
enable = true;
brscan4.enable = true;
};
};
}