fix: music working

This commit is contained in:
2026-01-21 07:59:38 -05:00
parent 2adf1b010b
commit 5eb2d1c3e2
8 changed files with 37 additions and 33 deletions

View File

@@ -119,7 +119,7 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = 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, ... }: { home-manager.users.max = { config, pkgs, lib, ... }: {
imports = [ imports = [
sops-nix.homeManagerModules.sops sops-nix.homeManagerModules.sops

View File

@@ -1,10 +1,10 @@
{ pkgs, ... }: { pkgs, pkgs-unstable, ... }:
let let
scripts = import ./hyprland/scripts/default.nix { inherit pkgs; }; scripts = import ./hyprland/scripts/default.nix { inherit pkgs; };
in in
{ {
imports = [ 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/wallpaper.nix { inherit pkgs scripts; })
(import ./hyprland/hyprlock.nix { inherit pkgs scripts; }) (import ./hyprland/hyprlock.nix { inherit pkgs scripts; })
(import ./hyprland/hypridle.nix { inherit pkgs scripts; }) (import ./hyprland/hypridle.nix { inherit pkgs scripts; })

View File

@@ -1,4 +1,4 @@
{ pkgs, scripts, ... }: { pkgs, pkgs-unstable, scripts, ... }:
{ {
imports = [ imports = [
./hyprland/performance.nix ./hyprland/performance.nix
@@ -194,9 +194,13 @@
# bind = $mainMod, M, exit, # bind = $mainMod, M, exit,
"$mainMod, E, exec, $fileManager" "$mainMod, E, exec, $fileManager"
"$mainMod, B, exec, $browser" "$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, V, togglefloating,"
"$mainMod, space, exec, $menu" "$mainMod, space, exec, $menu"
"$mainMod, P, pseudo, # dwindle" # "$mainMod, P, pseudo, # dwindle"
"$mainMod, F, fullscreen" "$mainMod, F, fullscreen"
# bind = $mainMod, J, togglesplit, # dwindle # bind = $mainMod, J, togglesplit, # dwindle
@@ -214,6 +218,9 @@
"$mainMod SHIFT, K, swapwindow, u" "$mainMod SHIFT, K, swapwindow, u"
"$mainMod SHIFT, J, swapwindow, d" "$mainMod SHIFT, J, swapwindow, d"
"$mainMod ALT, H, resizeactive, -40 0"
"$mainMod ALT, L, resizeactive, 40 0"
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1" "$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2" "$mainMod, 2, workspace, 2"

View File

@@ -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";
};
};
};
}

View File

@@ -14,7 +14,6 @@
../common/optional/locale.nix ../common/optional/locale.nix
../common/optional/email.nix ../common/optional/email.nix
../common/optional/proton.nix ../common/optional/proton.nix
../common/optional/music.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.

View File

@@ -14,6 +14,7 @@
./home/nvim.nix ./home/nvim.nix
./home/terminal.nix ./home/terminal.nix
./home/zathura.nix ./home/zathura.nix
./home/music.nix
]; ];
gtk = { gtk = {

23
host/max/home/music.nix Normal file
View File

@@ -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" ]; }
];
};
}

View File

@@ -49,6 +49,7 @@
initContent = '' initContent = ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' menu select
fzf-project() { fzf-project() {
selected=$(find ~/dev -mindepth 2 -maxdepth 2 | sed 's|/home/max/dev/||' | fzf --delimiter '/' --nth 2) selected=$(find ~/dev -mindepth 2 -maxdepth 2 | sed 's|/home/max/dev/||' | fzf --delimiter '/' --nth 2)