nix-conf/nixos-modules/printing/default.nix

37 lines
549 B
Nix
Raw Normal View History

2024-07-10 23:02:54 +02:00
{
config,
lib,
pkgs,
...
}:
2023-05-19 20:53:02 +02:00
2024-07-10 23:02:54 +02: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
};
}