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

24 lines
464 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 ];
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan hplip ];
};
};
}