mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-19 17:28:49 +02:00
Modularize htop and dual-function-keys
This commit is contained in:
parent
537357307e
commit
8c027300e6
@ -7,6 +7,8 @@
|
||||
./modules/fish.nix
|
||||
./modules/fonts.nix
|
||||
./modules/stylix
|
||||
./modules/htop.nix
|
||||
./modules/dual-function-keys.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@ -87,11 +89,6 @@
|
||||
programs.thunar.enable = true;
|
||||
|
||||
programs.neovim.enable = true;
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
package = pkgs."htop-vim";
|
||||
settings = { tree_view = 1; };
|
||||
};
|
||||
programs.firejail.enable = true;
|
||||
nix.package = pkgs.nixFlakes;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
@ -186,29 +183,5 @@
|
||||
networking.nat.internalInterfaces = [ "ve-+" ];
|
||||
networking.nat.externalInterface = "wg-mullvad";
|
||||
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||
udevmonConfig = ''
|
||||
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
||||
DEVICE:
|
||||
EVENTS:
|
||||
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."dual-function-keys.yaml".text = ''
|
||||
TIMING:
|
||||
- TAP_MILLISEC: 1000
|
||||
- DOUBLE_TAP_MILLISEC: 0
|
||||
MAPPINGS:
|
||||
- KEY: KEY_CAPSLOCK
|
||||
TAP: KEY_ESC
|
||||
HOLD: KEY_LEFTCTRL
|
||||
- KEY: KEY_SYSRQ
|
||||
TAP: KEY_SYSRQ
|
||||
HOLD: KEY_RIGHTMETA
|
||||
'';
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
27
modules/dual-function-keys.nix
Normal file
27
modules/dual-function-keys.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||
udevmonConfig = ''
|
||||
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
||||
DEVICE:
|
||||
EVENTS:
|
||||
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."dual-function-keys.yaml".text = ''
|
||||
TIMING:
|
||||
- TAP_MILLISEC: 1000
|
||||
- DOUBLE_TAP_MILLISEC: 0
|
||||
MAPPINGS:
|
||||
- KEY: KEY_CAPSLOCK
|
||||
TAP: KEY_ESC
|
||||
HOLD: KEY_LEFTCTRL
|
||||
- KEY: KEY_SYSRQ
|
||||
TAP: KEY_SYSRQ
|
||||
HOLD: KEY_RIGHTMETA
|
||||
'';
|
||||
}
|
9
modules/htop.nix
Normal file
9
modules/htop.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
package = pkgs."htop-vim";
|
||||
settings = { tree_view = 1; };
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user