cups: Add module
This commit is contained in:
23
modules/services/cups/default.nix
Normal file
23
modules/services/cups/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ 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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user