From 4a4f66c08e51a75497ac1c0f2a66713edf886551 Mon Sep 17 00:00:00 2001 From: biscuit Date: Thu, 19 Jun 2025 17:38:29 -0500 Subject: [PATCH] test --- config.local.nix | 2 +- modules/desktop/misc.nix | 1 - pkgs/logiops/custom/logid.cfg | 77 ---------------------------------- pkgs/logiops/default.nix | 5 --- system/desktop/misc.nix | 78 ++++++++++++++++++++++++++++++++++- system/users.nix | 2 +- 6 files changed, 79 insertions(+), 86 deletions(-) delete mode 100644 pkgs/logiops/custom/logid.cfg delete mode 100644 pkgs/logiops/default.nix diff --git a/config.local.nix b/config.local.nix index 7af1a97..25274fd 100644 --- a/config.local.nix +++ b/config.local.nix @@ -11,7 +11,7 @@ terminal = { termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font termSize = "18"; - termShell = "fish"; + termShell = "zsh"; shellAliases = { ls = "ls --color=auto"; diff --git a/modules/desktop/misc.nix b/modules/desktop/misc.nix index f8e4b6d..f223e2a 100644 --- a/modules/desktop/misc.nix +++ b/modules/desktop/misc.nix @@ -2,6 +2,5 @@ imports = [ ../../pkgs/btop/default.nix ../../pkgs/matugen/default.nix - ../../pkgs/logiops/default.nix ]; } diff --git a/pkgs/logiops/custom/logid.cfg b/pkgs/logiops/custom/logid.cfg deleted file mode 100644 index 0f2ebcf..0000000 --- a/pkgs/logiops/custom/logid.cfg +++ /dev/null @@ -1,77 +0,0 @@ -devices: ( -{ - name: "MX Master 3S"; - smartshift: - { - on: true; - threshold: 30; - torque: 50; - }; - hiresscroll: - { - hires: true; - invert: false; - target: false; - }; - dpi: 8000; - - buttons: ( - { - cid: 0xc3; - action = - { - type: "Gestures"; - gestures: ( - { - direction: "Up"; - mode: "OnRelease"; - action = - { - type: "Keypress"; - keys: ["KEY_UP"]; - }; - }, - { - direction: "Down"; - mode: "OnRelease"; - action = - { - type: "Keypress"; - keys: ["KEY_DOWN"]; - }; - }, - { - direction: "Left"; - mode: "OnRelease"; - action = - { - type: "CycleDPI"; - dpis: [400, 600, 800, 1000, 1200, 1400, 1600]; - }; - }, - { - direction: "Right"; - mode: "OnRelease"; - action = - { - type = "ToggleSmartshift"; - } - }, - { - direction: "None" - mode: "NoPress" - } - ); - }; - }, - { - cid: 0xc4; - action = - { - type: "Keypress"; - keys: ["KEY_A"]; - }; - } - ); -} -); diff --git a/pkgs/logiops/default.nix b/pkgs/logiops/default.nix deleted file mode 100644 index f580a4b..0000000 --- a/pkgs/logiops/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - home.file.".config/logiops/logid.cfg" = { - source = "./custom/logid.cfg"; - }; -} diff --git a/system/desktop/misc.nix b/system/desktop/misc.nix index 6a01380..62eecc9 100644 --- a/system/desktop/misc.nix +++ b/system/desktop/misc.nix @@ -1,3 +1,79 @@ -{...}: { +{pkgs, ...}: { services.printing.enable = true; + + # Install logiops package + environment.systemPackages = [pkgs.logiops]; + + # Create systemd service + systemd.services.logiops = { + description = "An unofficial userspace driver for HID++ Logitech devices"; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.logiops}/bin/logid"; + }; + }; + + # Configuration for logiops + environment.etc."logid.cfg".text = '' + devices: ({ + name: "Wireless Mouse MX Master 3"; + smartshift: { + on: true; + threshold: 12; + }; + hiresscroll: { + hires: true; + target: false; + }; + dpi: 1200; + buttons: ({ + cid: 0xc3; + action = { + type: "Gestures"; + gestures: ({ + direction: "Left"; + mode: "OnRelease"; + action = { + type = "Keypress"; + keys: ["KEY_F15"]; + }; + }, { + direction: "Right"; + mode: "OnRelease"; + action = { + type = "Keypress"; + keys: ["KEY_F16"]; + }; + }, { + direction: "Down"; + mode: "OnRelease"; + action = { + type: "Keypress"; + keys: ["KEY_F17"]; + }; + }, { + direction: "Up"; + mode: "OnRelease"; + action = { + type: "Keypress"; + keys: ["KEY_F18"]; + }; + }, { + direction: "None"; + mode: "OnRelease"; + action = { + type = "Keypress"; + keys: ["KEY_PLAYPAUSE"]; + }; + }); + }; + }, { + cid: 0xc4; + action = { + type: "Keypress"; + keys: ["KEY_F19"]; + }; + }); + }); + ''; } diff --git a/system/users.nix b/system/users.nix index 7d8a17f..447ce35 100644 --- a/system/users.nix +++ b/system/users.nix @@ -6,7 +6,7 @@ }: { users.users.${username} = { isNormalUser = true; - extraGroups = ["wheel" "networkmanager"]; + extraGroups = ["wheel" "networkmanager" "plugdev" "input"]; initialHashedPassword = "$6$Qab6SSvEJM2YRtVA$7Oyl7E3pp/FKtCC.2Tb2tyzp3yp7BFHFAKngUYJssQJ.v1Q2mqsgW9m7njpaKNcka2vyCwrnmw1R.YPlFqR0p1"; # shell = pkgs.zsh; shell = pkgs.${terminal.termShell};