summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-04-06 14:16:59 +0200
committerAlan Pearce2018-04-06 14:16:59 +0200
commitd2f24270cae82631df86479a2d3aee5a63290ff3 (patch)
tree6348a6da7c81983146eb8b45efd85b0fd1fb172d
parent906838d6f08e42d0e840808fffb8952abc859d5f (diff)
downloadnixos-configuration-d2f24270cae82631df86479a2d3aee5a63290ff3.tar.lz
nixos-configuration-d2f24270cae82631df86479a2d3aee5a63290ff3.tar.zst
nixos-configuration-d2f24270cae82631df86479a2d3aee5a63290ff3.zip
Add support for flashing model 01
-rw-r--r--modules/configuration/user.nix2
-rw-r--r--modules/hardware/keyboardio-model01.nix7
-rw-r--r--satoshipad.nix1
3 files changed, 9 insertions, 1 deletions
diff --git a/modules/configuration/user.nix b/modules/configuration/user.nix
index 75ba17f..1d4a183 100644
--- a/modules/configuration/user.nix
+++ b/modules/configuration/user.nix
@@ -3,7 +3,7 @@
 { users.extraUsers.alan = {
     description = "Alan Pearce";
     isNormalUser = true;
-    extraGroups = [ "audio" "wheel" "adbusers" "docker" "nitrokey" ];
+    extraGroups = [ "audio" "wheel" "adbusers" "docker" "nitrokey" "dialout" ];
     shell = "/run/current-system/sw/bin/zsh";
     home = "/home/alan";
     uid = 1000;
diff --git a/modules/hardware/keyboardio-model01.nix b/modules/hardware/keyboardio-model01.nix
new file mode 100644
index 0000000..33a3fd6
--- /dev/null
+++ b/modules/hardware/keyboardio-model01.nix
@@ -0,0 +1,7 @@
+{ config, pkgs, ... }:
+
+{ services.udev.extraRules = ''
+    SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
+    SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0"
+  '';
+}
diff --git a/satoshipad.nix b/satoshipad.nix
index a9b8f94..54ce5bd 100644
--- a/satoshipad.nix
+++ b/satoshipad.nix
@@ -16,6 +16,7 @@
     ./modules/hardware/adb.nix
     ./modules/hardware/audio.nix
     ./modules/hardware/systemd-boot.nix
+    ./modules/hardware/keyboardio-model01.nix
     ./modules/hardware/network-manager.nix
     ./modules/hardware/nitrokey.nix
     ./modules/hardware/printing.nix