nix-conf/modules/printing/default.nix

31 lines
540 B
Nix
Raw Normal View History

2023-12-29 16:43:40 +01:00
{ config, lib, pkgs, ... }:
2023-05-19 20:53:02 +02:00
2023-12-30 23:39:33 +01:00
let cfg = config.jopejoe1.printing;
in {
2023-12-29 16:43:40 +01:00
options.jopejoe1.printing = {
enable = lib.mkEnableOption "Enable Printing";
2023-05-19 20:53:02 +02:00
};
2023-12-29 16:43:40 +01:00
config = lib.mkIf cfg.enable {
services.printing = {
2023-05-19 20:53:02 +02:00
enable = true;
2023-12-29 16:43:40 +01:00
webInterface = true;
2024-04-02 20:23:02 +02:00
drivers = with pkgs; [ ];
2023-12-29 16:43:40 +01:00
};
hardware = {
sane = {
enable = true;
2024-04-02 20:23:02 +02:00
extraBackends = with pkgs; [ sane-airscan ];
2023-12-29 16:43:40 +01:00
};
2023-05-19 20:53:02 +02:00
};
2023-12-29 16:43:40 +01:00
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
2023-05-19 20:53:02 +02:00
};
}
2023-12-29 16:43:40 +01:00