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/aria2.nix
./programs/atuin.nix ./programs/atuin.nix
./programs/bash.nix
./programs/bat.nix
./programs/beets.nix ./programs/beets.nix
./programs/bottom.nix
./programs/comma.nix ./programs/comma.nix
./programs/direnv ./programs/direnv
./programs/eza.nix
./programs/fzf.nix
./programs/gdb.nix ./programs/gdb.nix
./programs/gh-dash.nix
./programs/gh.nix ./programs/gh.nix
./programs/gh-dash.nix
./programs/git ./programs/git
./programs/gpg ./programs/gpg
./programs/home-manager.nix
./programs/jq.nix ./programs/jq.nix
./programs/less.nix ./programs/less.nix
./programs/man.nix
./programs/neovim ./programs/neovim
./programs/nix-index ./programs/nix-index
./programs/pandoc.nix
./programs/ripgrep.nix
./programs/ssh ./programs/ssh
./programs/tealdeer ./programs/tealdeer
./programs/texlive.nix
./programs/thunderbird.nix ./programs/thunderbird.nix
./programs/tmux ./programs/tmux
./programs/yt-dlp.nix
./programs/zoxide.nix
./programs/zsh ./programs/zsh
./services/nix-channel-update.nix ./services/nix-channel-update.nix
@ -51,12 +39,9 @@ in {
./programs/alacritty.nix ./programs/alacritty.nix
./programs/emacs ./programs/emacs
./programs/feh.nix
./programs/firefox.nix ./programs/firefox.nix
./programs/mpv.nix
./programs/ncmpcpp.nix ./programs/ncmpcpp.nix
./programs/newsboat ./programs/newsboat
./programs/obs-studio.nix
./programs/qutebrowser.nix ./programs/qutebrowser.nix
./programs/rofi.nix ./programs/rofi.nix
./programs/taskwarrior.nix ./programs/taskwarrior.nix
@ -69,10 +54,7 @@ in {
./services/copyq.nix ./services/copyq.nix
./services/dunst.nix ./services/dunst.nix
./services/fcitx5.nix ./services/fcitx5.nix
./services/gnome-keyring.nix
./services/keybase.nix
./services/mpd.nix ./services/mpd.nix
./services/network-manager.nix
./services/picom.nix ./services/picom.nix
./services/polybar.nix ./services/polybar.nix
./services/screen-locker.nix ./services/screen-locker.nix
@ -151,6 +133,51 @@ in {
fonts.fontconfig.enable = mkForce true; 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 = { manual = {
html.enable = true; html.enable = true;
manpages.enable = true; manpages.enable = true;

View File

@ -5,6 +5,7 @@
cloc cloc
cyme cyme
czkawka czkawka
delta
diskonaut diskonaut
duf duf
duff duff
@ -20,6 +21,7 @@
httpie httpie
imagemagick imagemagick
kepubify kepubify
# keybase
keymapviz keymapviz
libwebp libwebp
lnav lnav
@ -39,15 +41,18 @@
# nixops # nixops
nmap nmap
ouch ouch
pandoc
parallel parallel
progress progress
pwntools pwntools
python3 python3
rclone rclone
ripgrep
rsync rsync
# sc-im # sc-im
slack-term slack-term
tea tea
tealdeer
terminal-parrot terminal-parrot
termtosvg termtosvg
toilet toilet
@ -59,6 +64,7 @@
waifu2x-converter-cpp waifu2x-converter-cpp
wavemon wavemon
wiki-tui wiki-tui
yt-dlp
yubico-pam yubico-pam
yubikey-agent yubikey-agent
yubikey-manager 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 = { programs.ncmpcpp = {
enable = true; enable = true;
@ -332,11 +332,11 @@
window_border_color = "green"; window_border_color = "green";
active_window_border = "red"; 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_output_name = "Visualizer feed";
visualizer_in_stereo = "no"; visualizer_in_stereo = "no";
# visualizer_type = "spectrum"; # spectrum, ellipse, wave_filled, wave visualizer_type = "spectrum"; # spectrum, ellipse, wave_filled, wave
# visualizer_look = "+█"; # wave | spectrum, ellipse, wave_filled visualizer_look = "+"; # wave | spectrum, ellipse, wave_filled
}; };
}; };
} }

View File

@ -66,6 +66,7 @@
} }
limelight-vim limelight-vim
vim-tmux-navigator vim-tmux-navigator
# vim-polyglot
lightline-vim lightline-vim
vim-better-whitespace 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"; mode = "0444";
}; };
programs.ssh = { programs.ssh.includes = [ config.sops.secrets."ssh/secret-config".path ];
enable = true;
includes = [
config.sops.secrets."ssh/secret-config".path
"mutable_config"
];
};
} }

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, ... }: { config, ... }:
let
cfg = config.services.mpd;
in
{ {
services.mpd = { services.mpd = rec {
enable = true; enable = true;
musicDirectory = config.xdg.userDirs.music; musicDirectory = config.xdg.userDirs.music;
playlistDirectory = "${cfg.musicDirectory}/playlists/MPD"; playlistDirectory = "${musicDirectory}/playlists/MPD";
network.startWhenNeeded = true; network.startWhenNeeded = true;
# TODO: make the path specific to the user unit
extraConfig = '' extraConfig = ''
pid_file "/run/user/${toString config.home.uid}/mpd/pid" audio_output {
type "fifo"
zeroconf_enabled "no" name "Visualizer feed"
path "/tmp/mpd.fifo"
replaygain "auto" format "44100:16:2"
}
restore_paused "yes"
auto_update "no"
audio_output { audio_output {
type "pipewire" type "pipewire"
name "PipeWire Sound Server" 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 # 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;
}