mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-12-11 16:00:48 +01:00
21 lines
471 B
Nix
21 lines
471 B
Nix
{ config, lib, pkgs, username, ... }:
|
|
|
|
let inherit (import ../../options.nix) printer; in
|
|
lib.mkIf (printer == true) {
|
|
services = {
|
|
printing.enable = true;
|
|
avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
ipp-usb.enable = true;
|
|
};
|
|
hardware.sane = {
|
|
enable = true;
|
|
extraBackends = [pkgs.sane-airscan];
|
|
disabledDefaultBackends = ["escl"];
|
|
};
|
|
users.users.${username}.extraGroups = ["scanner" "lp"];
|
|
}
|