pub-solar-os/modules/printing/default.nix
Benjamin Bädorf 552b2ee53e
Remove nonfree software
This commit removes the default, global `allowUnfree = true;` setting
and removes nonfree packages where I could find them. Tested by building
the `PubSolarOS` host once.
2022-08-14 14:15:02 +02:00

31 lines
753 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.printing;
in
{
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;
services.printing.listenAddresses = [ "localhost:631" ];
services.printing.allowFrom = [ "all" ];
services.printing.defaultShared = false;
services.printing.drivers = [
pkgs.gutenprint
];
hardware.sane = {
enable = true;
brscan4.enable = true;
};
};
}