mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-06 11:16:33 +01:00
32 lines
574 B
Nix
32 lines
574 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.jopejoe1.printing;
|
|
in
|
|
{
|
|
options.jopejoe1.printing = {
|
|
enable = lib.mkEnableOption "Enable Printing";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.printing = {
|
|
enable = true;
|
|
webInterface = true;
|
|
drivers = with pkgs; [ hplipWithPlugin ];
|
|
};
|
|
|
|
hardware = {
|
|
sane = {
|
|
enable = true;
|
|
extraBackends = with pkgs; [ sane-airscan hplipWithPlugin ];
|
|
};
|
|
};
|
|
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|
|
|