all repos — dotfiles @ 4b62ddc7a2b8e7b49231d38586f9966331b7ec8e

my *nix dotfiles

nix: brightness and mic controls on the x13
Anirudh Oppiliappan x@icyphox.sh
Sat, 23 Apr 2022 17:36:36 +0530
commit

4b62ddc7a2b8e7b49231d38586f9966331b7ec8e

parent

5b13cf6c2c77d26248e9aa67723b77cc2b37ce88

3 files changed, 8 insertions(+), 12 deletions(-)

jump to
M nix/hosts/wyndle/configuration.nixnix/hosts/wyndle/configuration.nix

@@ -1,15 +1,9 @@

-let - nixpkgs-tar = "https://github.com/NixOS/nixpkgs/archive/"; - asusctl-tar = fetchTarball "${nixpkgs-tar}a4a81b6f6c27e5a964faea25b7b5cbe611f98691.tar.gz"; -in { self, config, pkgs, theme, ... }: { imports = [ ./hardware-configuration.nix - "${asusctl-tar}/nixos/modules/services/misc/asusctl.nix" - "${asusctl-tar}/nixos/modules/services/misc/supergfxctl.nix" ]; boot.loader.systemd-boot.enable = true;

@@ -59,10 +53,6 @@

nixpkgs.overlays = with self.overlays; [ nvim-nightly prompt - (self: super: { - asusctl = pkgs.callpackage "${asusctl-tar}/pkgs/tools/misc/asusctl/default.nix" { }; - supergfxctl = pkgs.callpackage "${asusctl-tar}/pkgs/tools/misc/supergfxctl/default.nix" { }; - }) ]; environment.systemPackages = with pkgs; [

@@ -71,7 +61,6 @@ man-pages

git man-pages-posix (lib.hiPrio pkgs.bashInteractive_5) - asusctl ]; environment.variables = {

@@ -112,7 +101,6 @@ };

}; services = { - asusctl.enable = true; xserver = { enable = true; layout = "us";

@@ -133,6 +121,10 @@ # 2. lotus58 bootloader mode for rootless qmk flashing

udev = { extraRules = '' ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + ''; + extraHwdb = '' + evdev:input:b0003v0B05p19B6* + KEYBOARD_KEY_ff31007c=f20 # x11 mic-mute ''; path = [ pkgs.coreutils
M nix/programs/firefox.nixnix/programs/firefox.nix

@@ -3,6 +3,8 @@ , pkgs

, ... }: + +# XXX: Make sure to enable toolkit.legacyUserProfileCustomizations.stylesheets in about:config. { programs.firefox = { enable = true;
M nix/services/sxhkd.nixnix/services/sxhkd.nix

@@ -11,6 +11,8 @@ keybindings = {

"XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}"; "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle"; "XF86MonBrightness{Down,Up}" = "${pkgs.brightnessctl}/bin/brightnessctl s 10{-,+}"; + "XF86KbdBrightness{Down,Up}" = "${pkgs.brightnessctl}/bin/brightnessctl --device='asus::kbd_backlight' s 1{-,+}"; + "XF86AudioMicMute" = "${pkgs.alsaUtils}/bin/amixer set Capture toggle"; "super + Escape" = "pkill -USR1 -x sxhkd"; }; };