qmk/ergodox/udev: cleanup
This commit is contained in:
@@ -62,6 +62,7 @@
|
|||||||
sane.ids.clightning.gid = 2419;
|
sane.ids.clightning.gid = 2419;
|
||||||
sane.ids.nix-serve.uid = 2420;
|
sane.ids.nix-serve.uid = 2420;
|
||||||
sane.ids.nix-serve.gid = 2420;
|
sane.ids.nix-serve.gid = 2420;
|
||||||
|
sane.ids.plugdev.gid = 2421;
|
||||||
|
|
||||||
sane.ids.colin.uid = 1000;
|
sane.ids.colin.uid = 1000;
|
||||||
sane.ids.guest.uid = 1100;
|
sane.ids.guest.uid = 1100;
|
||||||
|
@@ -175,10 +175,12 @@ in
|
|||||||
# "gh" # MS GitHub cli
|
# "gh" # MS GitHub cli
|
||||||
"nix-index"
|
"nix-index"
|
||||||
"nixpkgs-review"
|
"nixpkgs-review"
|
||||||
|
"qmk-udev-rules"
|
||||||
"sane-scripts.dev"
|
"sane-scripts.dev"
|
||||||
"sequoia"
|
"sequoia"
|
||||||
|
# "via"
|
||||||
"wally-cli"
|
"wally-cli"
|
||||||
"zsa-udev-rules"
|
# "zsa-udev-rules"
|
||||||
];
|
];
|
||||||
|
|
||||||
consoleMediaUtils = declPackageSet [
|
consoleMediaUtils = declPackageSet [
|
||||||
@@ -365,7 +367,7 @@ in
|
|||||||
"inkscape"
|
"inkscape"
|
||||||
# "jellyfin-media-player"
|
# "jellyfin-media-player"
|
||||||
"kdenlive"
|
"kdenlive"
|
||||||
"keymapp"
|
# "keymapp"
|
||||||
# "kid3" # audio tagging
|
# "kid3" # audio tagging
|
||||||
"krita"
|
"krita"
|
||||||
"libreoffice" # TODO: replace with an office suite that uses saner packaging?
|
"libreoffice" # TODO: replace with an office suite that uses saner packaging?
|
||||||
|
@@ -116,6 +116,7 @@
|
|||||||
./portfolio-filemanager.nix
|
./portfolio-filemanager.nix
|
||||||
./playerctl.nix
|
./playerctl.nix
|
||||||
./ps.nix
|
./ps.nix
|
||||||
|
./qmk-udev-rules.nix
|
||||||
./rhythmbox.nix
|
./rhythmbox.nix
|
||||||
./ripgrep.nix
|
./ripgrep.nix
|
||||||
./rofi
|
./rofi
|
||||||
@@ -153,6 +154,7 @@
|
|||||||
./tor-browser.nix
|
./tor-browser.nix
|
||||||
./tuba.nix
|
./tuba.nix
|
||||||
./unl0kr
|
./unl0kr
|
||||||
|
./via.nix
|
||||||
./vlc.nix
|
./vlc.nix
|
||||||
./wally-cli.nix
|
./wally-cli.nix
|
||||||
./waybar
|
./waybar
|
||||||
|
9
hosts/common/programs/qmk-udev-rules.nix
Normal file
9
hosts/common/programs/qmk-udev-rules.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.qmk-udev-rules;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
sane.programs.qmk-udev-rules.sandbox.enable = false;
|
||||||
|
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
|
||||||
|
}
|
||||||
|
|
17
hosts/common/programs/via.nix
Normal file
17
hosts/common/programs/via.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# - <https://nixos.wiki/wiki/Qmk>
|
||||||
|
# via lets one change the keymap on a QMK keyboard without reflashing
|
||||||
|
# - intro: <https://www.caniusevia.com/docs/specification>
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.via;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
sane.programs.via = {
|
||||||
|
enableFor.system = lib.mkIf (builtins.any (en: en) (builtins.attrValues cfg.enableFor.user)) true;
|
||||||
|
};
|
||||||
|
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package pkgs.qmk-udev-rules ];
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# ZSA Ergodox Glow
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", ATTRS{idProduct}=="4976", TAG+="uaccess"
|
||||||
|
'';
|
||||||
|
}
|
@@ -56,6 +56,11 @@ in
|
|||||||
services.logind.powerKey = "lock";
|
services.logind.powerKey = "lock";
|
||||||
services.logind.powerKeyLongPress = "poweroff";
|
services.logind.powerKeyLongPress = "poweroff";
|
||||||
services.logind.lidSwitch = "lock";
|
services.logind.lidSwitch = "lock";
|
||||||
|
# under logind, 'uaccess' tag would grant the logged in user access to a device.
|
||||||
|
# outside logind, map uaccess tag -> plugdev group to grant that access.
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
TAG=="uaccess" GROUP="plugdev"
|
||||||
|
'';
|
||||||
|
|
||||||
systemd.extraConfig = ''
|
systemd.extraConfig = ''
|
||||||
# DefaultTimeoutStopSec defaults to 90s, and frequently blocks overall system shutdown.
|
# DefaultTimeoutStopSec defaults to 90s, and frequently blocks overall system shutdown.
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
"media" # servo
|
"media" # servo
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"nixbuild"
|
"nixbuild"
|
||||||
|
"plugdev" # desko, for ZSA/QMK/udev
|
||||||
"render" # for crappy, /dev/dri/render*
|
"render" # for crappy, /dev/dri/render*
|
||||||
"seat" # for sway, if using seatd
|
"seat" # for sway, if using seatd
|
||||||
"systemd-journal" # allows to view other user's journals (esp system users)
|
"systemd-journal" # allows to view other user's journals (esp system users)
|
||||||
|
@@ -21,6 +21,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
users.groups.media = {};
|
users.groups.media = {};
|
||||||
|
users.groups.plugdev = {};
|
||||||
|
|
||||||
# Users are exactly these specified here;
|
# Users are exactly these specified here;
|
||||||
# old ones will be deleted (from /etc/passwd, etc) upon upgrade.
|
# old ones will be deleted (from /etc/passwd, etc) upon upgrade.
|
||||||
|
Reference in New Issue
Block a user