diff --git a/flake.nix b/flake.nix index 5357f8f..920b1ca 100644 --- a/flake.nix +++ b/flake.nix @@ -119,7 +119,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit secrets zen-browser firefox-addons system; }; + home-manager.extraSpecialArgs = { inherit secrets zen-browser firefox-addons system pkgs-unstable; }; home-manager.users.max = { config, pkgs, lib, ... }: { imports = [ sops-nix.homeManagerModules.sops diff --git a/home/common/optional/desktop/hyprland.nix b/home/common/optional/desktop/hyprland.nix index 0490081..4c03fb2 100644 --- a/home/common/optional/desktop/hyprland.nix +++ b/home/common/optional/desktop/hyprland.nix @@ -1,10 +1,10 @@ -{ pkgs, ... }: +{ pkgs, pkgs-unstable, ... }: let scripts = import ./hyprland/scripts/default.nix { inherit pkgs; }; in { imports = [ - (import ./hyprland/hyprland.nix { inherit pkgs scripts; }) + (import ./hyprland/hyprland.nix { inherit pkgs scripts pkgs-unstable; }) (import ./hyprland/wallpaper.nix { inherit pkgs scripts; }) (import ./hyprland/hyprlock.nix { inherit pkgs scripts; }) (import ./hyprland/hypridle.nix { inherit pkgs scripts; }) diff --git a/home/common/optional/desktop/hyprland/hyprland.nix b/home/common/optional/desktop/hyprland/hyprland.nix index 0c22b49..234c324 100644 --- a/home/common/optional/desktop/hyprland/hyprland.nix +++ b/home/common/optional/desktop/hyprland/hyprland.nix @@ -1,4 +1,4 @@ -{ pkgs, scripts, ... }: +{ pkgs, pkgs-unstable, scripts, ... }: { imports = [ ./hyprland/performance.nix @@ -194,9 +194,13 @@ # bind = $mainMod, M, exit, "$mainMod, E, exec, $fileManager" "$mainMod, B, exec, $browser" + + "$mainMod, M, exec, $terminal -e ${pkgs-unstable.gurk-rs}/bin/gurk" + "$mainMod, P, exec, $terminal -e ${pkgs.ncmpcpp}/bin/ncmpcpp" + # "$mainMod, V, togglefloating," "$mainMod, space, exec, $menu" - "$mainMod, P, pseudo, # dwindle" + # "$mainMod, P, pseudo, # dwindle" "$mainMod, F, fullscreen" # bind = $mainMod, J, togglesplit, # dwindle @@ -214,6 +218,9 @@ "$mainMod SHIFT, K, swapwindow, u" "$mainMod SHIFT, J, swapwindow, d" + "$mainMod ALT, H, resizeactive, -40 0" + "$mainMod ALT, L, resizeactive, 40 0" + # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" diff --git a/host/common/optional/music.nix b/host/common/optional/music.nix deleted file mode 100644 index 00ae1e5..0000000 --- a/host/common/optional/music.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - mpc - ncmpcpp - ]; - - services.mpd = { - enable = true; - musicDirectory = "/home/max/media/music"; - user = "max"; - extraConfig = '' - audio_output { - type "pipewire" - name "Pipewire Ouput" - } - ''; - }; - - systemd = { - services = { - mpd.environment = { - XDG_RUNTIME_DIR = "/run/user/1001"; - }; - }; - }; -} diff --git a/host/max/default.nix b/host/max/default.nix index 301b2e5..0d24e03 100644 --- a/host/max/default.nix +++ b/host/max/default.nix @@ -14,7 +14,6 @@ ../common/optional/locale.nix ../common/optional/email.nix ../common/optional/proton.nix - ../common/optional/music.nix ]; # Use the systemd-boot EFI boot loader. diff --git a/host/max/home.nix b/host/max/home.nix index 126c11f..5ea1c9b 100644 --- a/host/max/home.nix +++ b/host/max/home.nix @@ -14,6 +14,7 @@ ./home/nvim.nix ./home/terminal.nix ./home/zathura.nix + ./home/music.nix ]; gtk = { diff --git a/host/max/home/music.nix b/host/max/home/music.nix new file mode 100644 index 0000000..2bcff96 --- /dev/null +++ b/host/max/home/music.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + mpc + ]; + + services.mpd = { + enable = true; + musicDirectory = "/home/max/media/music"; + }; + + services.mpd-mpris.enable = true; + + programs.ncmpcpp = { + enable = true; + bindings = [ + { key = "j"; command = "scroll_down"; } + { key = "k"; command = "scroll_up"; } + { key = "J"; command = [ "select_item" "scroll_down" ]; } + { key = "K"; command = [ "select_item" "scroll_up" ]; } + ]; + }; +} diff --git a/host/max/home/terminal.nix b/host/max/home/terminal.nix index 177b943..538661f 100644 --- a/host/max/home/terminal.nix +++ b/host/max/home/terminal.nix @@ -49,6 +49,7 @@ initContent = '' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + zstyle ':completion:*' menu select fzf-project() { selected=$(find ~/dev -mindepth 2 -maxdepth 2 | sed 's|/home/max/dev/||' | fzf --delimiter '/' --nth 2)