2024-10-21 12:31:30 +07:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-06-12 09:54:11 +07:00
|
|
|
let
|
|
|
|
cfg = config.profile.scanner;
|
2024-06-15 16:45:52 +07:00
|
|
|
username = config.profile.user.name;
|
2024-06-12 09:54:11 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-06-15 16:45:52 +07:00
|
|
|
users.users.${username}.extraGroups = [ "scanner" ];
|
2024-10-21 12:31:30 +07:00
|
|
|
environment.systemPackages = with pkgs; [ skanlite ];
|
2024-06-12 09:54:11 +07:00
|
|
|
hardware.sane = {
|
|
|
|
enable = true;
|
|
|
|
brscan4.enable = true; # Brother Scanner
|
2024-10-21 12:31:30 +07:00
|
|
|
extraBackends = with pkgs; [ sane-airscan ];
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|