From 9dcb0573bd3e6bc8272a75acf92b7fadf74c8c9b Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 16 Feb 2021 00:57:45 -0500 Subject: [PATCH] ScanSnap S1300 module --- default.nix | 1 + modules/scansnap_s1300.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/scansnap_s1300.nix diff --git a/default.nix b/default.nix index 60c42ae..e7a943d 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,7 @@ in ./modules/baseline.nix ./modules/cli.nix ./modules/flakes.nix + ./modules/scansnap_s1300.nix ./modules/scroll-boost ./modules/status-on-console.nix ]; diff --git a/modules/scansnap_s1300.nix b/modules/scansnap_s1300.nix new file mode 100644 index 0000000..c5ba47c --- /dev/null +++ b/modules/scansnap_s1300.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.sconfig.scansnap-s1300; +in +{ + options.sconfig.scansnap-s1300 = lib.mkEnableOption "Enable S1300 Scanning"; + + config = lib.mkIf cfg { + hardware.sane.enable = true; + nixpkgs.config.sane.extraFirmware = [{ + name = "1300_0C26.nal"; + backend = "epjitsu"; + src = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/stevleibelt/scansnap-firmware/96c3a8b2a4e4f1ccc4e5827c5eb5598084fd17c8/1300_0C26.nal"; + sha256 = "d693c9150fb00442d3f33f103ffb028410cd3cc53cf3d6df0817fb9d596b17f3"; + }; + }]; + }; +}