NixOS/system/modules/scanner.nix

21 lines
435 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.profile.scanner;
username = config.profile.user.name;
in
{
config = lib.mkIf cfg.enable {
users.users.${username}.extraGroups = [ "scanner" ];
environment.systemPackages = with pkgs; [
skanlite
];
hardware.sane = {
enable = true;
brscan4.enable = true; # Brother Scanner
extraBackends = with pkgs; [
sane-airscan
];
};
};
}