about summary refs log tree commit diff stats
path: root/modules/by-name/sc/scanning/module.nix
blob: dda507fa6dfa4471fe5a789296cea36269c89b90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.soispha.services.scanning;
in {
  options.soispha.services.scanning = {
    enable = lib.mkEnableOption "default scanning configuration";
  };

  config = lib.mkIf cfg.enable {
    hardware = {
      sane = {
        enable = true;
        extraBackends = [pkgs.sane-airscan];
      };
    };

    users.users.soispha.extraGroups = [
      "scanner" # for permission to access the scanner.
    ];
  };
}