nix: backlight is finally fixed + other things
Anirudh Oppiliappan x@icyphox.sh
Thu, 14 Apr 2022 11:04:37 +0530
5 files changed,
32 insertions(+),
15 deletions(-)
M
nix/flake.lock
→
nix/flake.lock
@@ -102,11 +102,11 @@ "neovim-flake": "neovim-flake",
"nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1648542057, - "narHash": "sha256-jAoVaba+0Pxcds6eDCrLdBudEHy1HH3lirO/SWblSA4=", + "lastModified": 1649837914, + "narHash": "sha256-wSkJqBOVXgqBl6c/8v80Z5cVw8ODN0gt5TB1apdQnI0=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "1426368bbc2137e735fbfcbb30b1ae3fe291f670", + "rev": "12d8c6b785d578379d178d3102a7ccfcf7335f47", "type": "github" }, "original": {@@ -125,11 +125,11 @@ ]
}, "locked": { "dir": "contrib", - "lastModified": 1648532309, - "narHash": "sha256-3SMmIGuGfpnVxjbuTXZBFgrJoIgetb9eY8bWExYEK9I=", + "lastModified": 1649798963, + "narHash": "sha256-bO271rs7X8n3BH/wfX+EsRuanfrT1AY5M3eg6XcUgvI=", "owner": "neovim", "repo": "neovim", - "rev": "d89a80fafc6cdf12f72dac2bcbd5055038a241dc", + "rev": "18152cf6f17fb4fd6dc6194bad33a971fc985b75", "type": "github" }, "original": {@@ -156,11 +156,11 @@ }
}, "nixpkgs": { "locked": { - "lastModified": 1648390671, - "narHash": "sha256-u69opCeHUx3CsdIerD0wVSR+DjfDQjnztObqfk9Trqc=", + "lastModified": 1649673231, + "narHash": "sha256-1T3AFscfS7s9pkFA+UIDrHH3/RLVjRdYs5ImuLYpOlE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ce8cbe3c01fd8ee2de526ccd84bbf9b82397a510", + "rev": "33772708c6d0e33f697426ba386aa0149cbcbecb", "type": "github" }, "original": {
M
nix/home.nix
→
nix/home.nix
@@ -49,6 +49,7 @@ libnotify
signal-desktop aerc calibre + pinentry ] ++ (import ./bin { inherit pkgs theme; });@@ -67,8 +68,8 @@ xsession = {
enable = true; windowManager.command = "cwm"; initExtra = '' - xrdb -load $HOME/.Xresources - xmodmap $HOME/.xmodmap + ${pkgs.xorg.setxkbmap}/bin/setxkbmap us,ru -option grp:ctrls_toggle + ${pkgs.xorg.xrdb}/bin/xrdb -load $HOME/.Xresources bar & ''; };
M
nix/hosts/lapis/configuration.nix
→
nix/hosts/lapis/configuration.nix
@@ -19,6 +19,9 @@ environmentFile = "/home/icy/secrets/wireless.env";
networks = { Sanic.psk = "@PSK_SANI@"; Gopalan.psk = "@PSK_GOPA@"; + "GoSpaze 2" = { + psk = "@PSK_GOSP@"; + }; }; extraConfig = '' ctrl_interface=/run/wpa_supplicant@@ -90,11 +93,22 @@ services = {
xserver = { enable = true; layout = "us"; - xkbVariant = "workman"; displayManager.startx.enable = true; libinput.enable = true; }; tailscale.enable = true; + + # 1. chmod for rootless backligh1t + # 2. lotus58 bootloader mode for rootless qmk flashing + udev = { + extraRules = '' + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" + ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + ''; + path = [ + pkgs.coreutils + ]; + }; }; virtualisation.docker = {@@ -117,7 +131,7 @@
users.users.icy = { isNormalUser = true; - extraGroups = [ "wheel" "docker" "audio" "video" ]; + extraGroups = [ "wheel" "docker" "audio" "video" "dialout" ]; }; nix = {
M
nix/programs/neovim.nix
→
nix/programs/neovim.nix
@@ -14,6 +14,8 @@ extraPackages = with pkgs; [
gotools gopls go + nodePackages.vscode-langservers-extracted + sumneko-lua-language-server ]; extraConfig = '' runtime _init.lua@@ -27,7 +29,7 @@ vim-surround
targets-vim vim-gitgutter vim-rsi - vim-jsonnet + # nvim-treesitter-textobjects ]; }; }
M
nix/services/sxhkd.nix
→
nix/services/sxhkd.nix
@@ -10,7 +10,7 @@ enable = true;
keybindings = { "XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}"; "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle"; - "XF86MonBrightness{Down,Up}" = "${pkgs.light}/bin/light -{U,A} 50"; + "XF86MonBrightness{Down,Up}" = "${pkgs.brightnessctl}/bin/brightnessctl s 100{-,+}"; "super + Escape" = "pkill -USR1 -x sxhkd"; }; };