Move zsh config to better location, disable polkit, add back playerctl and mpris in mpc's place

This commit is contained in:
Bun 2025-03-28 19:06:24 -04:00
parent aded6c206e
commit 9e3678d190
23 changed files with 85 additions and 87 deletions

View file

@ -6,6 +6,7 @@
icecast.enable = true; icecast.enable = true;
jellyfin.enable = true; jellyfin.enable = true;
matrix-synapse.enable = true; matrix-synapse.enable = true;
mysql.enable = true;
nextcloud.enable = true; nextcloud.enable = true;
nfs.server.enable = true; nfs.server.enable = true;
nginx.enable = true; nginx.enable = true;
@ -20,7 +21,7 @@
servers = { servers = {
velocity.enable = true; velocity.enable = true;
johnside.enable = true; johnside.enable = true;
marsh.enable = true; marsh.enable = true;
cornworld.enable = true; cornworld.enable = true;
skyblock.enable = true; skyblock.enable = true;
}; };

View file

@ -5,6 +5,7 @@
./disko ./disko
./filesystems ./filesystems
./hardware ./hardware
./servies
./users ./users
../../modules/system ../../modules/system
(modulesPath + "/profiles/headless.nix") (modulesPath + "/profiles/headless.nix")
@ -20,11 +21,4 @@
server.enable = true; server.enable = true;
stateVersion = "24.05"; stateVersion = "24.05";
}; };
services = {
cloudflare-dyndns.enable = true;
mailserver.enable = true;
nginx.enable = true;
wireguard.client.enable = true;
};
} }

View file

@ -0,0 +1,10 @@
{ ... }:
{
services = {
cloudflare-dyndns.enable = true;
mailserver.enable = true;
mysql.enable = true;
nginx.enable = true;
wireguard.client.enable = true;
};
}

View file

@ -8,7 +8,7 @@
thumbnail thumbnail
]; ];
config = { config = {
volume = 55; volume = 60;
loop-playlist = "inf"; loop-playlist = "inf";
osc = "no"; osc = "no";
}; };

View file

@ -3,6 +3,7 @@
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
ffmpeg ffmpeg
ffmpegthumbnailer ffmpegthumbnailer
playerctl
puddletag puddletag
pulsemixer pulsemixer
spotdl spotdl

View file

@ -1,22 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
config = lib.mkIf config.home.desktop.enable { programs.ncmpcpp = {
home.packages = with pkgs; [ mpc-cli ]; enable = config.services.mpd.enable;
settings = {
programs.ncmpcpp = { browser_sort_mode = "name";
enable = true; user_interface = "alternative";
settings = {
browser_sort_mode = "name";
user_interface = "alternative";
};
bindings = [
{ key = "h"; command = "volume_down"; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "l"; command = "volume_up"; }
];
}; };
bindings = [
services.mpd-discord-rpc.enable = true; { key = "h"; command = "volume_down"; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "l"; command = "volume_up"; }
];
}; };
} }

View file

@ -2,8 +2,10 @@
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
dotDir = ".config/zsh";
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
historySubstringSearch.enable = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
theme = "agnoster"; theme = "agnoster";
@ -16,11 +18,11 @@
append = true; append = true;
ignoreAllDups = true; ignoreAllDups = true;
ignoreSpace = true; ignoreSpace = true;
path = "$ZDOTDIR/.zsh_history";
}; };
initExtra = '' initExtra = ''
pfetch pfetch
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
setopt RM_STAR_WAIT
''; '';
}; };
} }

View file

@ -4,5 +4,6 @@
./easyeffects ./easyeffects
./gnome-keyring ./gnome-keyring
./mpd ./mpd
./playerctl
]; ];
} }

View file

@ -1,15 +1,19 @@
{ config, ... }: { config, lib, ... }:
{ {
services.mpd = { services = lib.mkIf config.home.desktop.enable {
enable = config.home.desktop.enable; mpd = {
network.startWhenNeeded = true; enable = true;
musicDirectory = "/home/${config.home.username}/Midas/storage/Music/NixBops"; network.startWhenNeeded = true;
playlistDirectory = "/home/${config.home.username}/Midas/storage/Music/NixBops/Playlists"; musicDirectory = "${config.home.homeDirectory}/Midas/storage/Music/NixBops";
extraConfig = '' playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists";
audio_output { extraConfig = ''
type "pipewire" audio_output {
name "Local Pipewire" type "pipewire"
} name "Local Pipewire"
''; }
'';
};
mpd-mpris.enable = true;
mpd-discord-rpc.enable = true;
}; };
} }

View file

@ -0,0 +1,4 @@
{ config, ... }:
{
services.playerctld.enable = config.home.desktop.enable;
}

View file

@ -10,7 +10,6 @@
spawn-at-startup "mako" spawn-at-startup "mako"
spawn-at-startup "rot8" spawn-at-startup "rot8"
spawn-at-startup "wlsunset" "-s" "23:00" "-S" "07:30" spawn-at-startup "wlsunset" "-s" "23:00" "-S" "07:30"
spawn-at-startup "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite" spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
// Foreground // Foreground

View file

@ -42,11 +42,12 @@
${secMod}+m { spawn "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } ${secMod}+m { spawn "sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
// MPD // MPD
${primeMod}+Backslash { spawn "sh" "-c" "mpc toggle"; } ${primeMod}+Backslash { spawn "sh" "-c" "playerctl -p firefox play-pause"; }
${secMod}+Shift+h { spawn "sh" "-c" "mpc prev"; } ${primeMod}+Shift+Backslash { spawn "sh" "-c" "playerctl -p mpd play-pause"; }
${secMod}+Shift+j { spawn "sh" "-c" "mpc volume -3"; } ${secMod}+Shift+h { spawn "sh" "-c" "playerctl -p mpd previous"; }
${secMod}+Shift+k { spawn "sh" "-c" "mpc volume +3"; } ${secMod}+Shift+j { spawn "sh" "-c" "playerctl -p mpd volume 0.03-"; }
${secMod}+Shift+l { spawn "sh" "-c" "mpc next"; } ${secMod}+Shift+k { spawn "sh" "-c" "playerctl -p mpd volume 0.03+"; }
${secMod}+Shift+l { spawn "sh" "-c" "playerctl -p mpd next"; }
//// Miscellaneous //// Miscellaneous
@ -151,7 +152,7 @@
${primeMod}+Shift+c { center-column; } ${primeMod}+Shift+c { center-column; }
// Move these into scratchpads if or when they get supported // Move these into scratchpads if or when they get supported
${primeMod}+Shift+Backslash { spawn "sh" "-c" "foot btop"; } ${primeMod}+Shift+BackSpace { spawn "sh" "-c" "foot btop"; }
${primeMod}+Shift+m { spawn "sh" "-c" "foot ncmpcpp"; } ${primeMod}+Shift+m { spawn "sh" "-c" "foot ncmpcpp"; }
${primeMod}+Shift+v { spawn "sh" "-c" "foot pulsemixer"; } ${primeMod}+Shift+v { spawn "sh" "-c" "foot pulsemixer"; }
} }

View file

@ -16,5 +16,8 @@
warp-mouse-to-focus warp-mouse-to-focus
focus-follows-mouse focus-follows-mouse
} }
clipboard {
disable-primary
}
''; '';
} }

View file

@ -17,7 +17,6 @@
{ command = "sunshine"; } { command = "sunshine"; }
{ command = "rot8"; } { command = "rot8"; }
{ command = "wlsunset -s 22:30 -S 07:30"; } { command = "wlsunset -s 22:30 -S 07:30"; }
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
# Foreground # Foreground
{ command = "thunderbird"; } { command = "thunderbird"; }

View file

@ -46,11 +46,12 @@
"${secMod}+m" = ''exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle''; "${secMod}+m" = ''exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
# MPD # MPD
"${primeMod}+Backslash" = ''exec mpc toggle''; "${primeMod}+Backslash" = ''exec playerctl -p firefox play-pause'';
"${secMod}+Shift+h" = ''exec mpc prev''; "${primeMod}+Shift+Backslash" = ''exec playerctl -p mpd play-pause'';
"${secMod}+Shift+j" = ''exec mpc volume -3''; "${secMod}+Shift+h" = ''exec playerctl -p mpd previous'';
"${secMod}+Shift+k" = ''exec mpc volume +3''; "${secMod}+Shift+j" = ''exec playerctl -p mpd volume 0.03-'';
"${secMod}+Shift+l" = ''exec mpc next''; "${secMod}+Shift+k" = ''exec playerctl -p mpd volume 0.03+'';
"${secMod}+Shift+l" = ''exec playerctl -p mpd next'';
## Miscellaneous ## Miscellaneous
@ -152,7 +153,7 @@
"${primeMod}+shift+a" = ''focus child''; "${primeMod}+shift+a" = ''focus child'';
# Scratchpads # Scratchpads
"${primeMod}+Shift+Backslash" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888''; "${primeMod}+Shift+BackSpace" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888'';
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657''; "${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800''; "${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
}; };

View file

@ -1,11 +1,8 @@
{ config, lib, ... }: { ... }:
{ {
boot.loader = { boot.loader.grub = {
grub = { efiSupport = true;
efiSupport = true; efiInstallAsRemovable = true;
efiInstallAsRemovable = true; device = "nodev";
device = "nodev";
};
efi.canTouchEfiVariables = false;
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, lanzaboote, ... }: { pkgs, lanzaboote, ... }:
{ {
imports = [ lanzaboote.nixosModules.lanzaboote ]; imports = [ lanzaboote.nixosModules.lanzaboote ];

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { ... }:
{ {
boot.loader.systemd-boot = { boot.loader.systemd-boot = {
editor = false; editor = false;

View file

@ -16,10 +16,11 @@
".config/blender" ".config/blender"
".config/dconf" ".config/dconf"
".config/vesktop"
".config/sunshine"
".config/heroic" ".config/heroic"
".config/obs-studio" ".config/obs-studio"
".config/sunshine"
".config/vesktop"
".config/zsh"
".local/share/mpd" ".local/share/mpd"
".local/share/nvim/undo" ".local/share/nvim/undo"
@ -28,6 +29,7 @@
".local/share/TelegramDesktop" ".local/share/TelegramDesktop"
".local/state/wireplumber" ".local/state/wireplumber"
".local/state/lazygit"
".cache/nix-index" ".cache/nix-index"
@ -35,11 +37,6 @@
{ directory = ".gnupg"; mode = "0700"; } { directory = ".gnupg"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; } { directory = ".local/share/keyrings"; mode = "0700"; }
]; ];
files = [
".zsh_history"
".local/state/lazygit/state.yml"
".local/share/applications" # Create directory so nothing generates inside of it
];
}; };
}; };
} }

View file

@ -1,12 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
config = lib.mkIf config.system.server.enable { services.mysql.package = pkgs.mariadb;
services.mysql = { environment.persistence."/persist".directories = lib.mkIf config.services.mysql.enable [ "/var/lib/mysql" ];
enable = true;
package = pkgs.mariadb;
};
environment.persistence."/persist".directories = [
"/var/lib/mysql"
];
};
} }

View file

@ -2,7 +2,7 @@
{ {
imports = [ imports = [
./apparmor ./apparmor
./polkit
./privilege ./privilege
./rtkit
]; ];
} }

View file

@ -1,7 +0,0 @@
{ config, lib, ... }:
{
security = lib.mkIf config.system.desktop.enable {
polkit.enable = true;
rtkit.enable = true;
};
}

View file

@ -0,0 +1,4 @@
{ config, ... }:
{
security.rtkit.enable = config.system.desktop.enable;
}