nixos-config/modules/services/cups/default.nix

28 lines
549 B
Nix

{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.cups;
in {
options.ptw.services.cups = {
enable = lib.mkEnableOption "Enable Cups";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ gnome.simple-scan ];
services.printing = {
enable = true;
drivers = with pkgs; [ hplip ];
};
services.avahi = {
enable = lib.mkForce true;
nssmdns = true;
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan hplip ];
};
};
}