Compare commits

..

No commits in common. "7c36272914f3104b85f7b45d034610ae86238205" and "dc79a237b3b7c4937ab253a359f09a37892f102e" have entirely different histories.

24 changed files with 69 additions and 246 deletions

View File

@ -10,34 +10,22 @@ in {
./programs/aria2.nix
./programs/atuin.nix
./programs/bash.nix
./programs/bat.nix
./programs/beets.nix
./programs/bottom.nix
./programs/comma.nix
./programs/direnv
./programs/eza.nix
./programs/fzf.nix
./programs/gdb.nix
./programs/gh-dash.nix
./programs/gh.nix
./programs/gh-dash.nix
./programs/git
./programs/gpg
./programs/home-manager.nix
./programs/jq.nix
./programs/less.nix
./programs/man.nix
./programs/neovim
./programs/nix-index
./programs/pandoc.nix
./programs/ripgrep.nix
./programs/ssh
./programs/tealdeer
./programs/texlive.nix
./programs/thunderbird.nix
./programs/tmux
./programs/yt-dlp.nix
./programs/zoxide.nix
./programs/zsh
./services/nix-channel-update.nix
@ -51,12 +39,9 @@ in {
./programs/alacritty.nix
./programs/emacs
./programs/feh.nix
./programs/firefox.nix
./programs/mpv.nix
./programs/ncmpcpp.nix
./programs/newsboat
./programs/obs-studio.nix
./programs/qutebrowser.nix
./programs/rofi.nix
./programs/taskwarrior.nix
@ -69,10 +54,7 @@ in {
./services/copyq.nix
./services/dunst.nix
./services/fcitx5.nix
./services/gnome-keyring.nix
./services/keybase.nix
./services/mpd.nix
./services/network-manager.nix
./services/picom.nix
./services/polybar.nix
./services/screen-locker.nix
@ -151,6 +133,51 @@ in {
fonts.fontconfig.enable = mkForce true;
programs = {
home-manager.enable = true;
bash = {
enable = true;
historyFile = "${config.xdg.dataHome}/bash_history";
historySize = 100000;
bashrcExtra = ''
source "${config.xdg.configHome}/mutable_env.sh"
'';
};
bat.enable = true;
bottom = {
enable = true;
settings.flags.enable_gpu = true;
};
eza.enable = true;
feh.enable = mkIf graphics true;
fzf = {
enable = true;
defaultCommand = "fd --type f";
};
man = {
enable = true;
generateCaches = true;
};
mpv.enable = mkIf graphics true;
obs-studio.enable = mkIf graphics true;
ssh = {
enable = true;
includes = [ "mutable_config" ];
};
texlive = {
enable = true;
# packageSet = pkgs.texlive.combined.scheme-medium;
};
zoxide.enable = true;
};
services = {
gnome-keyring.enable = mkIf graphics true;
network-manager-applet.enable = mkIf graphics true;
};
manual = {
html.enable = true;
manpages.enable = true;

View File

@ -5,6 +5,7 @@
cloc
cyme
czkawka
delta
diskonaut
duf
duff
@ -20,6 +21,7 @@
httpie
imagemagick
kepubify
# keybase
keymapviz
libwebp
lnav
@ -39,15 +41,18 @@
# nixops
nmap
ouch
pandoc
parallel
progress
pwntools
python3
rclone
ripgrep
rsync
# sc-im
slack-term
tea
tealdeer
terminal-parrot
termtosvg
toilet
@ -59,6 +64,7 @@
waifu2x-converter-cpp
wavemon
wiki-tui
yt-dlp
yubico-pam
yubikey-agent
yubikey-manager

View File

@ -1,11 +0,0 @@
{ config, ... }:
{
programs.bash = {
enable = true;
historyFile = "${config.xdg.dataHome}/bash_history";
historySize = 100000;
bashrcExtra = ''
source "${config.xdg.configHome}/mutable_env.sh"
'';
};
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.bat.enable = true;
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
programs.bottom = {
enable = true;
settings.flags.enable_gpu = true;
};
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.eza.enable = true;
}

View File

@ -1,4 +0,0 @@
{ machineVars, ... }:
{
programs.feh.enable = !machineVars.headless;
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
programs.fzf = {
enable = true;
defaultCommand = "fd --type f";
};
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.home-manager.enable = true;
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
programs.man = {
enable = true;
generateCaches = true;
};
}

View File

@ -1,4 +0,0 @@
{ machineVars, ... }:
{
programs.mpv.enable = !machineVars.headless;
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{pkgs, ...}:
{
programs.ncmpcpp = {
enable = true;
@ -332,11 +332,11 @@
window_border_color = "green";
active_window_border = "red";
visualizer_data_source = "/run/user/${toString config.home.uid}/mpd/visualizer.fifo";
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "Visualizer feed";
visualizer_in_stereo = "no";
# visualizer_type = "spectrum"; # spectrum, ellipse, wave_filled, wave
# visualizer_look = "+█"; # wave | spectrum, ellipse, wave_filled
visualizer_type = "spectrum"; # spectrum, ellipse, wave_filled, wave
visualizer_look = "+"; # wave | spectrum, ellipse, wave_filled
};
};
}

View File

@ -66,6 +66,7 @@
}
limelight-vim
vim-tmux-navigator
# vim-polyglot
lightline-vim
vim-better-whitespace
{

View File

@ -1,4 +0,0 @@
{ machineVars, ... }:
{
programs.obs-studio.enable = !machineVars.headless;
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.pandoc.enable = true;
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.ripgrep.enable = true;
}

View File

@ -10,11 +10,5 @@
mode = "0444";
};
programs.ssh = {
enable = true;
includes = [
config.sops.secrets."ssh/secret-config".path
"mutable_config"
];
};
programs.ssh.includes = [ config.sops.secrets."ssh/secret-config".path ];
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
programs.texlive = {
enable = true;
# packageSet = pkgs.texlive.combined.scheme-medium;
};
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.yt-dlp.enable = true;
}

View File

@ -1,4 +0,0 @@
{ ... }:
{
programs.zoxide.enable = true;
}

View File

@ -1,4 +0,0 @@
{ machineVars, ... }:
{
services.gnome-keyring.enable = !machineVars.headless;
}

View File

@ -1,5 +0,0 @@
{ ... }:
{
services.keybase.enable = true;
services.kbfs.enable = true;
}

View File

@ -1,141 +1,28 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.mpd;
in
{ config, ... }:
{
services.mpd = {
services.mpd = rec {
enable = true;
musicDirectory = config.xdg.userDirs.music;
playlistDirectory = "${cfg.musicDirectory}/playlists/MPD";
playlistDirectory = "${musicDirectory}/playlists/MPD";
network.startWhenNeeded = true;
# TODO: make the path specific to the user unit
extraConfig = ''
pid_file "/run/user/${toString config.home.uid}/mpd/pid"
zeroconf_enabled "no"
replaygain "auto"
restore_paused "yes"
auto_update "no"
audio_output {
type "fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
audio_output {
type "fifo"
name "Visualizer feed"
path "/run/user/${toString config.home.uid}/mpd/visualizer.fifo"
format "44100:16:2"
}
resampler {
plugin "soxr"
quality "very high"
}
playlist_plugin {
name "cue"
enabled "true"
}
playlist_plugin {
name "m3u"
enabled "true"
}
playlist_plugin {
name "extm3u"
enabled "true"
}
playlist_plugin {
name "flac"
enabled "true"
}
playlist_plugin {
name "rss"
enabled "true"
}
'';
};
# TODO: disable auto_update and use systemd path to listen for changes
# TODO: upstream unix socket support to home-manager
systemd.user.services.mpd = {
Unit = {
Documentation = [
"man:mpd(1)"
"man:mpd.conf(5)"
];
};
Service = {
WatchdogSec = 120;
# for io_uring
LimitMEMLOCK = "64M";
# allow MPD to use real-time priority 40
LimitRTPRIO = 40;
LimitRTTIME = "infinity";
PrivateUsers = true;
ProtectSystem = true;
NoNewPrivileges = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [
"AF_INET"
"AF_UNIX"
];
RestrictNamespaces = true;
};
};
systemd.user.paths.mpd-update-library = {
Unit = {
Description = "Watchdog that updates the mpd library whenever the files are modified";
Documentation = [
"man:mpd(1)"
"man:mpd.conf(5)"
];
WantedBy = [ "paths.target" ];
};
Path = {
PathChanged = cfg.musicDirectory;
Unit = "mpd-update-library.service";
TriggerLimitIntervalSec = "1s";
TriggerLimitBurst = "1";
};
};
systemd.user.services.mpd-update-library = {
Unit = {
Description = "Watchdog that updates the mpd library whenever the files are modified";
Documentation = [
"man:mpd(1)"
"man:mpd.conf(5)"
];
};
Service = {
Type = "oneshot";
ExecStart = "${lib.getExe pkgs.mpc-cli} update --wait";
PrivateUsers = true;
ProtectSystem = true;
NoNewPrivileges = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [
"AF_INET"
"AF_UNIX"
];
RestrictNamespaces = true;
};
};
}

View File

@ -1,4 +0,0 @@
{ machineVars, ... }:
{
services.network-manager-applet.enable = !machineVars.headless;
}