diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 22:41:00 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 22:41:00 +0100 |
commit | 07229574e2e0feef3e4984025d9b2b9a6776f51d (patch) | |
tree | 4e94a2b47fa4f38f98959efae6eb250a4207701b | |
parent | build(treewide): Update (diff) | |
download | nixos-config-07229574e2e0feef3e4984025d9b2b9a6776f51d.zip |
feat(modules/legacy/river): Add mapping to start `qmk-unicode-type`
That program communicates with my keyboard and sets a Unicode character.
-rw-r--r-- | flake.lock | 31 | ||||
-rw-r--r-- | flake.nix | 11 | ||||
-rw-r--r-- | flake/default.nix | 2 | ||||
-rw-r--r-- | flake/nixosConfigurations/common.nix | 1 | ||||
-rw-r--r-- | flake/nixosConfigurations/default.nix | 2 | ||||
-rw-r--r-- | modules/by-name/ho/home-manager/module.nix | 2 | ||||
-rw-r--r-- | modules/by-name/ri/river/module.nix | 18 | ||||
-rw-r--r-- | modules/home.legacy/wms/river/default.nix | 3 | ||||
-rw-r--r-- | modules/home.legacy/wms/river/res/moonlander.ron | 4 |
9 files changed, 73 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock index 6091a852..062bd90b 100644 --- a/flake.lock +++ b/flake.lock @@ -668,6 +668,36 @@ "type": "github" } }, + "qmk_firmware": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ], + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1735581190, + "narHash": "sha256-zr6qyB0E4w+N2xDD5Sg9/gUOQ+k/oet9Cc5D8V7nhfs=", + "ref": "prime", + "rev": "d99e4119792b832928a0306d0f342710b53a6ef3", + "revCount": 8, + "type": "git", + "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout.git" + }, + "original": { + "ref": "prime", + "type": "git", + "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout.git" + } + }, "ragenix": { "inputs": { "agenix": [ @@ -762,6 +792,7 @@ "nuschtosSearch": "nuschtosSearch", "poetry2nix": "poetry2nix", "pre-commit-hooks": "pre-commit-hooks", + "qmk_firmware": "qmk_firmware", "ragenix": "ragenix", "river_init_lesser": "river_init_lesser", "rust-overlay": "rust-overlay", diff --git a/flake.nix b/flake.nix index a8be86e4..d08eb34a 100644 --- a/flake.nix +++ b/flake.nix @@ -246,6 +246,15 @@ flake-compat.follows = "flake-compat"; }; }; + qmk_firmware = { + url = "git+https://git.foss-syndicate.org/bpeetz/qmk_layout.git?ref=prime"; + inputs = { + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + systems.follows = "systems"; + flake-utils.follows = "flake-utils"; + }; + }; # external resources user_js = { @@ -286,6 +295,7 @@ # my binaries shell_library, river_init_lesser, + qmk_firmware, ... }: let system = "x86_64-linux"; @@ -337,6 +347,7 @@ # my binaries shell_library river_init_lesser + qmk_firmware ; }; in diff --git a/flake/default.nix b/flake/default.nix index 2c8d6f6b..be6d2b70 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -27,6 +27,7 @@ # my binaries shell_library, river_init_lesser, + qmk_firmware, }: let treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; @@ -56,6 +57,7 @@ nix-index-database # bins river_init_lesser + qmk_firmware # external user_js ; diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index 90ee9920..b8601c75 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -108,6 +108,7 @@ imv.enable = true; less.enable = true; lf.enable = true; + river.enable = true; taskwarrior.enable = true; yambar.enable = true; yt.enable = true; diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index 7d98f868..b0a02580 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -23,6 +23,7 @@ nix-index-database, # bins river_init_lesser, + qmk_firmware, # external user_js, }: let @@ -62,6 +63,7 @@ # bins # TODO: Integrate these into `pkgs/by-name` <2024-05-22> river_init_lesser + qmk_firmware serverphone # external deps user_js diff --git a/modules/by-name/ho/home-manager/module.nix b/modules/by-name/ho/home-manager/module.nix index d8b48c1c..f5304170 100644 --- a/modules/by-name/ho/home-manager/module.nix +++ b/modules/by-name/ho/home-manager/module.nix @@ -10,6 +10,7 @@ # TODO: Integrate these <2024-05-22> river_init_lesser, shell_library, + qmk_firmware, # external deps user_js, # modules @@ -43,6 +44,7 @@ in { # bins river_init_lesser shell_library + qmk_firmware # external deps user_js # modules diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix new file mode 100644 index 00000000..6b9b044a --- /dev/null +++ b/modules/by-name/ri/river/module.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + qmk_firmware, + system, + ... +}: let + cfg = config.soispha.programs.river; +in { + options.soispha.programs.river = { + enable = lib.mkEnableOption "river"; + }; + + config = lib.mkIf cfg.enable { + # TODO: Migrate complete river module <2024-12-30> + services.udev.packages = [qmk_firmware.packages.${system}.qmk_firmware]; + }; +} diff --git a/modules/home.legacy/wms/river/default.nix b/modules/home.legacy/wms/river/default.nix index 274b9223..9463e94e 100644 --- a/modules/home.legacy/wms/river/default.nix +++ b/modules/home.legacy/wms/river/default.nix @@ -4,6 +4,7 @@ river_init_lesser, nixosConfig, system, + qmk_firmware, ... }: let inherit (nixosConfig.networking) hostName; @@ -61,6 +62,8 @@ in { keepPath = true; dependencies = builtins.attrValues { river_init_lesser = river_init_lesser.packages.${system}.default; + inherit (qmk_firmware.packages.${system}) qmk_unicode_type; + inherit (pkgs) dash diff --git a/modules/home.legacy/wms/river/res/moonlander.ron b/modules/home.legacy/wms/river/res/moonlander.ron index 77ffa5c4..4051635f 100644 --- a/modules/home.legacy/wms/river/res/moonlander.ron +++ b/modules/home.legacy/wms/river/res/moonlander.ron @@ -40,13 +40,15 @@ RiverctlCommandArray( RiverctlCommand( map_mode: Map, mode: ["normal"], key: "W", mods: "Alt+Control+Super+Shift", command: "send-to-previous-tags",command_args: None,), //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "X", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Y", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), - //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Z", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",), // Toggle all tags RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Super+Shift", command: "set-focused-tags", command_args: "4294967295"), RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Shift", command: "set-view-tags", command_args: "4294967295"), + // Support Unicode input + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Z", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "qmk-unicode-type",), + // Mouse RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), |