From 38f18d807a1946a13fe75488e282b57a17d67174 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Wed, 16 Oct 2024 00:06:31 -0500 Subject: [PATCH] updates, add gintent command --- flake.lock | 12 ++++----- hosts/gpdPocket3/configuration.nix | 5 +--- hosts/gpdPocket3/stupid-keyboard-2.nix | 18 -------------- hosts/gpdPocket3/stupid-keyboard.nix | 34 -------------------------- modules/shell/common.sh | 13 ++++++++++ 5 files changed, 20 insertions(+), 62 deletions(-) delete mode 100644 hosts/gpdPocket3/stupid-keyboard-2.nix delete mode 100644 hosts/gpdPocket3/stupid-keyboard.nix diff --git a/flake.lock b/flake.lock index 4b26365..902cec3 100644 --- a/flake.lock +++ b/flake.lock @@ -32,11 +32,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1728869792, - "narHash": "sha256-1AujVEpY/jt1E0aaTDlf3ib+n5u/e+B86vqKBKwRPJw=", + "lastModified": 1728956173, + "narHash": "sha256-0D5MsCsbFQJNGnYvbSvUInKfzYfGup5KAHtOMkiXQRQ=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "6f172927a96412d81e5de7ce8ebcc6f70ea68203", + "rev": "a1e3c25b1d6fb0a88a5bbb61cc4bd502439a68ff", "type": "github" }, "original": { @@ -1290,11 +1290,11 @@ ] }, "locked": { - "lastModified": 1728786660, - "narHash": "sha256-qY+1e0o6oV5ySlErhj/dsWsPLWjrMKzq4QI7a1t9/Ps=", + "lastModified": 1728873041, + "narHash": "sha256-e4jz7yFADiZjMhv+iQwYtAN8AOUlOpbNQYnbwUFLjeM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "174a8d9cec9e2c23877a7b887c52b68ef0421d8b", + "rev": "bdbe1611c2029de90bca372ce0b1e3b4fa65f55a", "type": "github" }, "original": { diff --git a/hosts/gpdPocket3/configuration.nix b/hosts/gpdPocket3/configuration.nix index 1c02926..729de13 100644 --- a/hosts/gpdPocket3/configuration.nix +++ b/hosts/gpdPocket3/configuration.nix @@ -10,9 +10,6 @@ # Users this machine has (settings.usersDir + "/root/configuration.nix") (settings.usersDir + "/josh/configuration.nix") - # Our custom stuff - # ./stupid-keyboard.nix - # ./stupid-keyboard-2.nix ]; # My custom modules @@ -79,7 +76,7 @@ "nvme" "xhci_pci" "usbhid" - "thunderbolt" + "thuFryuni/PolyMC/developnderbolt" ]; services.xserver.videoDrivers = [ "intel" ]; hardware.opengl = { diff --git a/hosts/gpdPocket3/stupid-keyboard-2.nix b/hosts/gpdPocket3/stupid-keyboard-2.nix deleted file mode 100644 index 18704ae..0000000 --- a/hosts/gpdPocket3/stupid-keyboard-2.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: -{ - services.keyd = { - enable = true; - # `keyd monitor` to get new keys to remap - keyboards = { - rgo_sino_keyboard = { - ids = [ "04e8:7021" ]; - settings = { - main = { - "up" = "/"; - "/" = "up"; - }; - }; - }; - }; - }; -} diff --git a/hosts/gpdPocket3/stupid-keyboard.nix b/hosts/gpdPocket3/stupid-keyboard.nix deleted file mode 100644 index d1048ce..0000000 --- a/hosts/gpdPocket3/stupid-keyboard.nix +++ /dev/null @@ -1,34 +0,0 @@ -# This nix file is just a fix for a really stupid lay-outed keyboard I bought that I -# only use with the gpd pocket 3. Probably not relevant to anyone else -# -# Keyboard in question: https://www.walmart.com/ip/R-Go-Split-Ergonomic-Keyboard-QWERTY-US-Black-Wired-USB-Keyboard-Spilt-Wired-Windows-Linux/452297950 -# R-Go Split Break Keyboard (maybe the walmart one is a fake since their real site does not have the same layout) -# https://www.r-go-tools.com/ergonomic-keyboard/r-go-split-break/ -{ ... }: -let - rgo_keyboard_vid = "0911"; - rgo_keyboard_pid = "2188"; - rgo_hub_vid = "05e3"; - rgo_hub_pid = "0608"; -in -{ - services.keyd = { - enable = true; - # `keyd monitor` to get new keys to remap - keyboards = { - rgo_sino_keyboard = { - ids = [ "0911:2188" "05e3:0608" ]; - settings = { - main = { - # Backslash is in place of the enter key's normal position, so setting it to enter - "\\" = "enter"; - # This keyboard has a strange extra key that outputs < and > characters. It has the - # backslash key printed on it though, conveniently, so we will just map this to backslash - # since it does not affect how I use left shift (which it takes half the space of) - "102nd" = "\\"; - }; - }; - }; - }; - }; -} diff --git a/modules/shell/common.sh b/modules/shell/common.sh index fecfd7d..958133a 100644 --- a/modules/shell/common.sh +++ b/modules/shell/common.sh @@ -142,3 +142,16 @@ nixpkg () { done eval $cmd } + +gintent() { + for file in "$@"; do + if [ -f "$file" ]; then + git add --intent-to-add "$file" + git update-index --assume-unchanged "$file" + echo "Intent added for $file" + else + echo "File not found: $file" + fi + done +} +