From 368cb6b0d25db2ae23be42ad51584de059997e51 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 May 2024 16:10:21 +0200 Subject: refactor(sys): Modularize and move to `modules/system` or `pkgs` --- modules/system/services/scanning/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/system/services/scanning/default.nix (limited to 'modules/system/services/scanning') diff --git a/modules/system/services/scanning/default.nix b/modules/system/services/scanning/default.nix new file mode 100644 index 00000000..dda507fa --- /dev/null +++ b/modules/system/services/scanning/default.nix @@ -0,0 +1,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. + ]; + }; +} -- cgit 1.4.1