From ae6ab2ae6180a69d244fa9efda2e0d68ea8b7b9d Mon Sep 17 00:00:00 2001 From: Vegard Bieker Matthey Date: Thu, 18 Dec 2025 11:34:58 +0100 Subject: [PATCH] set up media keys --- configuration.nix | 22 +++++++++++++++------- flake.lock | 24 ++++++++++++------------ home.nix | 35 +++++++++++++++++++++-------------- 3 files changed, 48 insertions(+), 33 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5e8d2d6..7eaff87 100644 --- a/configuration.nix +++ b/configuration.nix @@ -41,8 +41,6 @@ ]; emoji = [ "Noto Color Emoji" - "Noto Emoji" - "Noto Emoji Blob" ]; }; fonts.packages = with pkgs; [ @@ -52,11 +50,8 @@ noto-fonts-cjk-sans noto-fonts-cjk-serif noto-fonts-color-emoji - noto-fonts-emoji-blob-bin ]; - services.xserver.xkb.layout = "no"; - environment.sessionVariables = rec { XDG_CACHE_HOME = "$HOME/.cache"; XDG_CONFIG_HOME = "$HOME/.config"; @@ -68,16 +63,20 @@ "${XDG_BIN_HOME}" ]; + HISTFILE = "${XDG_STATE_HOME}/bash/history"; CARGO_HOME = "${XDG_DATA_HOME}/cargo"; }; services.pipewire = { enable = true; pulse.enable = true; + audio.enable = true; }; services.libinput.enable = true; + services.udev.packages = with pkgs; [ light ]; + services.keyd = { enable = true; keyboards = { @@ -97,7 +96,7 @@ users.users.vbm = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = [ "wheel" "video" "input" ]; shell = pkgs.nushell; packages = with pkgs; [ tree @@ -114,6 +113,11 @@ upx gcc nixfmt-rfc-style + imv + unzip + zip + zathura + qbittorrent ]; }; @@ -129,8 +133,12 @@ }; security.sudo.enable = false; security.polkit.enable = true; + security.rtkit.enable = true; - programs.light.enable = true; + programs.light = { + enable = true; + brightnessKeys.enable = true; + }; # Necessary for gtk config, see: https://github.com/nix-community/home-manager/issues/3113 programs.dconf.enable = true; diff --git a/flake.lock b/flake.lock index 5702795..9ba25f8 100644 --- a/flake.lock +++ b/flake.lock @@ -49,11 +49,11 @@ ] }, "locked": { - "lastModified": 1765682243, - "narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=", + "lastModified": 1765858431, + "narHash": "sha256-HV1Pn5FvSLceuQaejI0TbU4dY1pEZ7RSI/8qbYfkHQI=", "owner": "nix-community", "repo": "home-manager", - "rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03", + "rev": "6cdf765eede13e27771b4066a49fe24e31498f94", "type": "github" }, "original": { @@ -64,11 +64,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1765779637, + "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", + "rev": "1306659b587dc277866c7b69eb97e5f07864d8c4", "type": "github" }, "original": { @@ -87,11 +87,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1765646394, - "narHash": "sha256-yqeB023/s/SOxhpm4SFKBDHagzn5L/KF7bCA10ZH/Q4=", + "lastModified": 1765841289, + "narHash": "sha256-LpkgAzXRlh+qxbRGIsSy5kOX1oOzlFlZeOt/QmITg5M=", "owner": "nix-community", "repo": "nixvim", - "rev": "c97e8e34250c7fe5d4e0c3333a0ca4a9d28957d0", + "rev": "bdc41e4133d4b9e2c0d4f85265d7cce889b55743", "type": "github" }, "original": { @@ -108,11 +108,11 @@ ] }, "locked": { - "lastModified": 1765846734, - "narHash": "sha256-xPno2sNwqa9rYaOnJTPhqtZwMiqYwyvWK6trGqMCrkA=", + "lastModified": 1765857889, + "narHash": "sha256-SGvzyo81b0aDo6pHpsMCRAyl4UsR0fV4iskQq9LFGT8=", "owner": "nix-community", "repo": "NUR", - "rev": "7c8a6ae3f2eac660bb70392cab9a9d2b6f7215c8", + "rev": "734d06cdd4cd916cbc3403262775f3fc14b24301", "type": "github" }, "original": { diff --git a/home.nix b/home.nix index ea666ab..10834a2 100644 --- a/home.nix +++ b/home.nix @@ -27,6 +27,10 @@ services.ssh-agent.enable = true; + services.mako = { + enable = true; + }; + services.batsignal = { enable = true; extraArgs = [ @@ -49,6 +53,18 @@ gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; }; + qt = { + enable = true; + platformTheme.name = "adwaita"; + style.name = "adwaita-dark"; + }; + + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + programs.ssh = { enable = true; enableDefaultConfig = false; @@ -169,20 +185,11 @@ "${modifier}+Return" = "exec ${terminal}"; "${modifier}+Shift+q" = "kill"; "${modifier}+p" = "exec ${menu}"; + "XF86Search" = "exec ${menu}"; "${modifier}+Shift+e" = "exec swaymsg exit"; - "XF86MonBrightnessDown" = "exec light -U 10"; - "XF86MonBrightnessUp" = "exec light -A 10"; - "XF86AudioRaiseVolume" = "exec wpctl set-sink-volume @DEFAULT_SINK@ +1%"; - "XF86AudioLowerVolume" = "exec wpctl set-sink-volume @DEFAULT_SINK@ -1%"; - "XF86AudioMute" = "exec wpctl set-sink-mute @DEFAULT_SINK@ toggle"; - - "${modifier}+Up" = "exec light -U 10"; - "${modifier}+Down" = "exec light -A 10"; - "${modifier}+F3" = "exec wpctl set-sink-volume @DEFAULT_SINK@ +1%"; - "${modifier}+F2" = "exec wpctl set-sink-volume @DEFAULT_SINK@ -1%"; - "${modifier}+F1" = "exec wpctl set-sink-mute @DEFAULT_SINK@ toggle"; - "${modifier}+F6" = "exec light -U 10"; - "${modifier}+F7" = "exec light -A 10"; + "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 1%+"; + "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 1%-"; + "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_SINK@ toggle"; "${modifier}+Delete" = "exec shutdown now"; }; }; @@ -358,7 +365,7 @@ params = [ { name = "search"; - value = "{serachTerms}"; + value = "{searchTerms}"; } ]; }