Home: Update top-level user config for homelab integration
This commit is contained in:
@ -6,17 +6,19 @@
|
|||||||
inputs,
|
inputs,
|
||||||
hostname,
|
hostname,
|
||||||
username,
|
username,
|
||||||
|
publicKeys,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
nixosConfig,
|
nixosConfig,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
headless,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# This is a HM module.
|
# This is a HM module.
|
||||||
# Because no imports/options/config is defined explicitly, everything is treated as config:
|
# Because no imports/options/config is defined explicitly, everything is treated as config:
|
||||||
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly.
|
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly.
|
||||||
rec {
|
{
|
||||||
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }.
|
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }.
|
||||||
# Every module (/function) is called with the same arguments as this module.
|
# Every module (/function) is called with the same arguments as this module.
|
||||||
# Arguments with matching names are "plugged in" into the right slots,
|
# Arguments with matching names are "plugged in" into the right slots,
|
||||||
@ -33,15 +35,17 @@ rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Enable and configure my custom HM modules.
|
# Enable and configure my custom HM modules.
|
||||||
paths = {
|
paths = rec {
|
||||||
enable = true; # You can't disable this
|
enable = true; # You can't disable this
|
||||||
nixflake = "${config.home.homeDirectory}/NixFlake";
|
nixflake = "${config.home.homeDirectory}/NixFlake";
|
||||||
dotfiles = "${config.home.homeDirectory}/NixFlake/config";
|
dotfiles = "${nixflake}/config";
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
|
beets.enable = !headless;
|
||||||
|
|
||||||
chromium = {
|
chromium = {
|
||||||
enable = true;
|
enable = !headless;
|
||||||
google = false;
|
google = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -53,10 +57,10 @@ rec {
|
|||||||
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
|
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
|
||||||
};
|
};
|
||||||
|
|
||||||
docs.enable = true;
|
docs.enable = !headless;
|
||||||
|
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = !headless;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
vaapi = true;
|
vaapi = true;
|
||||||
disableTabBar = true;
|
disableTabBar = true;
|
||||||
@ -66,10 +70,18 @@ rec {
|
|||||||
|
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
|
||||||
hyprland = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
userName = "Christoph Urlacher";
|
||||||
|
userEmail = "christoph.urlacher@protonmail.com";
|
||||||
|
signCommits = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
enable = !headless;
|
||||||
dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel
|
dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel
|
||||||
theme = "Foggy-Lake"; # Three-Bears
|
theme = "Foggy-Lake"; # TODO: Remove this in favor of color.lightScheme
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
main-mod = "SUPER";
|
main-mod = "SUPER";
|
||||||
@ -79,6 +91,7 @@ rec {
|
|||||||
"$mainMod, E" = ["exec, kitty"];
|
"$mainMod, E" = ["exec, kitty"];
|
||||||
"$mainMod, N" = ["exec, neovide"];
|
"$mainMod, N" = ["exec, neovide"];
|
||||||
"$mainMod, R" = ["exec, kitty --class=rmpc --title=Rmpc rmpc"];
|
"$mainMod, R" = ["exec, kitty --class=rmpc --title=Rmpc rmpc"];
|
||||||
|
"$mainMod, F" = ["exec, firefox"];
|
||||||
"$mainMod CTRL, N" = ["exec, kitty --class=navi --title=Navi navi"];
|
"$mainMod CTRL, N" = ["exec, kitty --class=navi --title=Navi navi"];
|
||||||
"$mainMod SHIFT, N" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
"$mainMod SHIFT, N" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
||||||
"$mainMod SHIFT, F" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
"$mainMod SHIFT, F" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
||||||
@ -114,12 +127,7 @@ rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
windowrules = [
|
windowrules = [];
|
||||||
# Prevent unity from activating when its reloading the editor
|
|
||||||
# TODO: Doesn't work, use focus_on_activate for now
|
|
||||||
# "suppressevent activate, class:^(Unity)$"
|
|
||||||
# "suppressevent activatefocus, class:^(Unity)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
workspacerules = {
|
workspacerules = {
|
||||||
"special" = [
|
"special" = [
|
||||||
@ -209,26 +217,27 @@ rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprpanel.enable = true;
|
hyprpanel.enable = !headless;
|
||||||
kitty.enable = true;
|
kitty.enable = !headless;
|
||||||
|
mpd.enable = !headless;
|
||||||
|
|
||||||
neovim = {
|
neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alias = true;
|
alias = true;
|
||||||
neovide = true;
|
neovide = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
nnn.enable = false; # Use yazi
|
nnn.enable = false; # Use yazi
|
||||||
rmpc.enable = true;
|
rmpc.enable = !headless;
|
||||||
|
|
||||||
rofi = {
|
rofi = {
|
||||||
enable = true;
|
enable = !headless;
|
||||||
# theme = "Three-Bears";
|
theme = "Foggy-Lake"; # TODO: Remove this in favor of color.lightScheme
|
||||||
theme = "Foggy-Lake";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
waybar.enable = false; # Use hyprpanel
|
waybar.enable = false; # Use hyprpanel
|
||||||
zathura.enable = true;
|
yazi.enable = true;
|
||||||
|
zathura.enable = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
manual = {
|
manual = {
|
||||||
@ -238,12 +247,12 @@ rec {
|
|||||||
|
|
||||||
# Make fonts installed through user packages available to applications.
|
# Make fonts installed through user packages available to applications.
|
||||||
# Also updates the font-cache.
|
# Also updates the font-cache.
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = !headless;
|
||||||
|
|
||||||
# This only works when HM is installed as a system module,
|
# This only works when HM is installed as a system module,
|
||||||
# as nixosConfig won't be available otherwise.
|
# as nixosConfig won't be available otherwise.
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = !headless;
|
||||||
mime.enable = true;
|
mime.enable = true;
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -260,59 +269,55 @@ rec {
|
|||||||
home = {
|
home = {
|
||||||
inherit username; # Inherited from flake.nix
|
inherit username; # Inherited from flake.nix
|
||||||
|
|
||||||
homeDirectory = "/home/${home.username}";
|
homeDirectory = "/home/${config.home.username}";
|
||||||
enableNixpkgsReleaseCheck = true;
|
enableNixpkgsReleaseCheck = true;
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
sessionVariables = {
|
sessionVariables = lib.mkMerge [
|
||||||
LANG = "en_US.UTF-8";
|
{
|
||||||
|
LANG = "en_US.UTF-8";
|
||||||
|
DOCKER_BUILDKIT = 1;
|
||||||
|
}
|
||||||
|
(lib.mkIf (!headless) {
|
||||||
|
# TERMINAL = "alacritty -o font.size=12";
|
||||||
|
TERMINAL = "kitty";
|
||||||
|
BROWSER = "firefox";
|
||||||
|
|
||||||
# TERMINAL = "alacritty -o font.size=12";
|
# Enable wayland
|
||||||
TERMINAL = "kitty";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
BROWSER = "firefox";
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
|
||||||
DOCKER_BUILDKIT = 1;
|
# Run SSH_ASKPASS as GUI, not TTY for Obsidian git
|
||||||
|
SSH_ASKPASS_REQUIRE = "prefer";
|
||||||
|
|
||||||
# Enable wayland
|
# GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
|
||||||
XDG_SESSION_TYPE = "wayland";
|
})
|
||||||
QT_QPA_PLATFORM = "wayland";
|
];
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
SDL_VIDEODRIVER = "wayland";
|
|
||||||
|
|
||||||
# Run SSH_ASKPASS as GUI, not TTY for Obsidian git
|
|
||||||
SSH_ASKPASS_REQUIRE = "prefer";
|
|
||||||
|
|
||||||
# GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
|
|
||||||
};
|
|
||||||
|
|
||||||
# Files to generate in the home directory are specified here.
|
# Files to generate in the home directory are specified here.
|
||||||
file = let
|
file = lib.mkMerge [
|
||||||
# NOTE: SSH public key
|
{
|
||||||
sshPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
|
".ssh/id_ed25519.pub".text = "${publicKeys.ssh}";
|
||||||
in {
|
}
|
||||||
# Generate a list of installed user packages in ~/.local/share/current-user-packages
|
(lib.mkIf nixosConfig.modules.desktopportal.termfilechooser.enable {
|
||||||
".local/share/current-user-packages".text = let
|
".config/xdg-desktop-portal-termfilechooser/config".text = ''
|
||||||
packages = builtins.map (p: "${p.name}") home.packages;
|
[filechooser]
|
||||||
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
|
cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
||||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
default_dir=$HOME
|
||||||
in
|
env=TERMCMD=kitty --class=file_chooser
|
||||||
formatted;
|
open_mode = suggested
|
||||||
|
save_mode = last
|
||||||
# TODO: If navi enabled
|
'';
|
||||||
".local/share/navi/cheats/christoph.cheat".source = config.lib.file.mkOutOfStoreSymlink "${config.paths.dotfiles}/navi/christoph.cheat";
|
})
|
||||||
|
(lib.mkIf config.modules.git.enable {
|
||||||
".ssh/id_ed25519.pub".text = "${sshPublicKey}";
|
".ssh/allowed_signers".text = "* ${publicKeys.ssh}";
|
||||||
".ssh/allowed_signers".text = "* ${sshPublicKey}";
|
})
|
||||||
|
(lib.mkIf config.programs.navi.enable {
|
||||||
".config/xdg-desktop-portal-termfilechooser/config".text = ''
|
".local/share/navi/cheats/christoph.cheat".source = config.lib.file.mkOutOfStoreSymlink "${config.paths.dotfiles}/navi/christoph.cheat";
|
||||||
[filechooser]
|
})
|
||||||
cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
];
|
||||||
default_dir=$HOME
|
|
||||||
env=TERMCMD=kitty --class=file_chooser
|
|
||||||
open_mode = suggested
|
|
||||||
save_mode = last
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Here, custom scripts can be run when activating a HM generation.
|
# Here, custom scripts can be run when activating a HM generation.
|
||||||
# If those scripts contain side-effects, like creating files,
|
# If those scripts contain side-effects, like creating files,
|
||||||
@ -325,126 +330,122 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
packages = with pkgs; [
|
packages = with pkgs;
|
||||||
# Shell utils
|
lib.mkMerge [
|
||||||
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
|
[
|
||||||
gdu # Alternative to du-dust (I like it better)
|
# Shell utils
|
||||||
duf # Disk usage analyzer (for all disk overview)
|
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
|
||||||
sd # sed alternative
|
gdu # Alternative to du-dust (I like it better)
|
||||||
fclones # duplicate file finder
|
duf # Disk usage analyzer (for all disk overview)
|
||||||
tealdeer # very fast tldr (so readable man)
|
sd # sed alternative
|
||||||
killall
|
fclones # duplicate file finder
|
||||||
atool # Archive preview
|
tealdeer # very fast tldr (so readable man)
|
||||||
ouch # unified compression/decompression
|
killall
|
||||||
ffmpegthumbnailer # Video thumbnails
|
atool # Archive preview
|
||||||
mediainfo # Media meta information
|
ouch # unified compression/decompression
|
||||||
file # File meta information
|
ffmpegthumbnailer # Video thumbnails
|
||||||
tree # Folder preview
|
mediainfo # Media meta information
|
||||||
unrar # Cooler WinRar
|
file # File meta information
|
||||||
p7zip # Zip stuff
|
tree # Folder preview
|
||||||
unzip # Unzip stuff
|
unrar # Cooler WinRar
|
||||||
progress # Find coreutils processes and show their progress
|
p7zip # Zip stuff
|
||||||
tokei # Text file statistics in a project
|
unzip # Unzip stuff
|
||||||
ripdrag # drag & drop from terminal
|
progress # Find coreutils processes and show their progress
|
||||||
playerctl # media player control
|
tokei # Text file statistics in a project
|
||||||
pastel # color tools
|
ripdrag # drag & drop from terminal
|
||||||
nvd # nix rebuild diff
|
playerctl # media player control
|
||||||
nix-search-tv # search nixpkgs, nur, nixos options and homemanager options
|
pastel # color tools
|
||||||
nix-tree # Browse the nix store sorted by size (gdu for closures)
|
nvd # nix rebuild diff
|
||||||
nurl # Generate nix fetcher sections based on URLs
|
nix-search-tv # search nixpkgs, nur, nixos options and homemanager options
|
||||||
|
nix-tree # Browse the nix store sorted by size (gdu for closures)
|
||||||
|
nurl # Generate nix fetcher sections based on URLs
|
||||||
|
python313 # Nicer scripting than bash
|
||||||
|
|
||||||
# Run unpatched binaries on NixOS
|
# Hardware/Software info
|
||||||
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
|
pciutils # lspci
|
||||||
# Start dynamically linked executable using "nix-alien-ld -- <Executable>".
|
glxinfo # opengl info
|
||||||
inputs.nix-alien.packages.${system}.nix-alien
|
wayland-utils # wayland-info
|
||||||
|
clinfo # OpenCL info
|
||||||
|
vulkan-tools # vulkaninfo
|
||||||
|
libva-utils # vainfo
|
||||||
|
vdpauinfo # Video-Decode and Presentation API for Unix info
|
||||||
|
hwloc # Generate CPU topology diagram
|
||||||
|
lm_sensors # Readout hardware sensors
|
||||||
|
acpica-tools # Dump ACPI tables etc.
|
||||||
|
|
||||||
# Search nixpkgs
|
# Video/Image/Audio utils
|
||||||
inputs.nps.packages.${system}.default
|
ffmpeg-full # I love ffmpeg (including ffplay)
|
||||||
|
ffmpeg-normalize # Normalize audio
|
||||||
|
imagemagick # Convert image (magic)
|
||||||
|
mp3val # Validate mp3 files
|
||||||
|
flac # Validate flac files
|
||||||
|
spotdl
|
||||||
|
|
||||||
# Hardware/Software info
|
# Document utils
|
||||||
pciutils # lspci
|
poppler_utils # pdfunite
|
||||||
glxinfo # opengl info
|
graphviz # generate graphs from code
|
||||||
wayland-utils # wayland-info
|
d2 # generate diagrams from code
|
||||||
clinfo # OpenCL info
|
plantuml # generate diagrams
|
||||||
vulkan-tools # vulkaninfo
|
gnuplot # generate function plots
|
||||||
libva-utils # vainfo
|
pdf2svg # extract vector graphics from pdf
|
||||||
vdpauinfo # Video-Decode and Presentation API for Unix info
|
pandoc # document converting madness
|
||||||
hwloc # Generate CPU topology diagram
|
|
||||||
lm_sensors # Readout hardware sensors
|
|
||||||
acpica-tools # Dump ACPI tables etc.
|
|
||||||
|
|
||||||
# Video/Image/Audio utils
|
# Networking
|
||||||
ffmpeg_7-full # I love ffmpeg (including ffplay)
|
dig # Make DNS requests
|
||||||
ffmpeg-normalize # Normalize audio
|
tcpdump # Listen in on TCP traffic
|
||||||
imagemagick # Convert image (magic)
|
traceroute # "Follow" a packet
|
||||||
mp3val # Validate mp3 files
|
gping # ping with graph
|
||||||
flac # Validate flac files
|
curlie # curl a'la httpie
|
||||||
spotdl
|
wget # download that shit
|
||||||
|
dogdns # dns client
|
||||||
|
rsync # cp on steroids
|
||||||
|
rclone # Rsync for cloud
|
||||||
|
httpie # Cool http client
|
||||||
|
cifs-utils # Mount samba shares
|
||||||
|
nfs-utils # Mount NFS shares
|
||||||
|
sshfs # Mount remote directories via SSH
|
||||||
|
protonvpn-cli_2
|
||||||
|
protonmail-bridge # TODO: Enable on startup, email module
|
||||||
|
|
||||||
# Document utils
|
# Run unpatched binaries on NixOS
|
||||||
poppler_utils # pdfunite
|
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
|
||||||
graphviz # generate graphs from code
|
# Usage: "nix-alien-ld -- <Executable>".
|
||||||
d2 # generate diagrams from code
|
inputs.nix-alien.packages.${system}.nix-alien
|
||||||
plantuml # generate diagrams
|
|
||||||
gnuplot # generate function plots
|
|
||||||
pdf2svg # extract vector graphics from pdf
|
|
||||||
pandoc # document converting madness
|
|
||||||
# decker # TODO: Build failure
|
|
||||||
|
|
||||||
# Networking
|
# Search nixpkgs
|
||||||
dig # Make DNS requests
|
inputs.nps.packages.${system}.default
|
||||||
tcpdump # Listen in on TCP traffic
|
|
||||||
traceroute # "Follow" a packet
|
|
||||||
gping # ping with graph
|
|
||||||
curlie # curl a'la httpie
|
|
||||||
wget # download that shit
|
|
||||||
dogdns # dns client
|
|
||||||
rsync # cp on steroids
|
|
||||||
rclone # Rsync for cloud
|
|
||||||
httpie # Cool http client
|
|
||||||
cifs-utils # Mount samba shares
|
|
||||||
nfs-utils # Mount NFS shares
|
|
||||||
sshfs # Mount remote directories via SSH
|
|
||||||
|
|
||||||
protonvpn-gui
|
# Use NixCommunity binary cache
|
||||||
protonvpn-cli_2
|
cachix
|
||||||
protonmail-bridge-gui
|
]
|
||||||
protonmail-bridge # TODO: Enable on startup, email module
|
(lib.mkIf (!headless) [
|
||||||
|
# Proton
|
||||||
|
protonvpn-gui
|
||||||
|
protonmail-bridge-gui
|
||||||
|
|
||||||
# GUI apps
|
# GUI stuff
|
||||||
signal-desktop
|
signal-desktop
|
||||||
anki
|
anki
|
||||||
font-manager # Previews fonts, but doesn't set them
|
font-manager # Previews fonts, but doesn't set them
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
keepassxc
|
keepassxc
|
||||||
AusweisApp2
|
thunderbird # TODO: Email module
|
||||||
thunderbird # TODO: Email module
|
obsidian
|
||||||
obsidian
|
zotero
|
||||||
# logseq
|
zeal-qt6 # docs browser
|
||||||
# anytype # Use flatpak
|
helvum
|
||||||
zotero
|
vlc
|
||||||
zeal-qt6 # docs browser
|
audacity
|
||||||
helvum
|
ferdium
|
||||||
vlc
|
|
||||||
audacity
|
|
||||||
ferdium
|
|
||||||
|
|
||||||
# Office
|
# Office
|
||||||
wacomtablet # For xournalpp/krita
|
wacomtablet # For xournalpp/krita
|
||||||
xournalpp # Write with a pen, like old people
|
xournalpp # Write with a pen, like old people
|
||||||
hunspell # I cna't type
|
hunspell # I cna't type
|
||||||
hunspellDicts.en_US
|
hunspellDicts.en_US
|
||||||
hunspellDicts.de_DE
|
hunspellDicts.de_DE
|
||||||
|
])
|
||||||
# TODO: Module, I need to add python packages from multiple modules to the same interpreter
|
];
|
||||||
python313
|
|
||||||
|
|
||||||
# Use NixCommunity binary cache
|
|
||||||
cachix
|
|
||||||
|
|
||||||
# Generate documentation
|
|
||||||
# modules-options-doc
|
|
||||||
];
|
|
||||||
|
|
||||||
# Do not change.
|
# Do not change.
|
||||||
# This marks the version when NixOS was installed for backwards-compatibility.
|
# This marks the version when NixOS was installed for backwards-compatibility.
|
||||||
@ -479,71 +480,10 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Music taggins and mpd stats collection
|
|
||||||
beets = {
|
|
||||||
enable = true;
|
|
||||||
mpdIntegration = {
|
|
||||||
host = "127.0.0.1";
|
|
||||||
port = config.services.mpd.network.port;
|
|
||||||
enableUpdate = true;
|
|
||||||
enableStats = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://beets.readthedocs.io/en/stable/reference/config.html
|
|
||||||
settings = {
|
|
||||||
directory = "${home.homeDirectory}/Music";
|
|
||||||
threaded = true;
|
|
||||||
art_filename = "cover";
|
|
||||||
|
|
||||||
ui = {
|
|
||||||
color = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
import = {
|
|
||||||
write = true; # Write metadata to files
|
|
||||||
copy = false; # Copy files to the music directory when importing
|
|
||||||
move = true; # Move files to the music directory when importing
|
|
||||||
log = "${home.homeDirectory}/Music/.beetslog.txt";
|
|
||||||
};
|
|
||||||
|
|
||||||
paths = {
|
|
||||||
default = "$albumartist/$albumartist - $album/$track $title";
|
|
||||||
singleton = "0 Singles/$artist - $title"; # Single songs
|
|
||||||
comp = "1 Various/$album/$track $title";
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = [
|
|
||||||
"badfiles" # check audio file integrity
|
|
||||||
"duplicates"
|
|
||||||
"edit" # edit metadata in text editor
|
|
||||||
"fetchart" # pickup local cover art or search online
|
|
||||||
"fish" # beet fish generates ~/.config/fish/completions file
|
|
||||||
# "lyrics" # fetch song lyrics
|
|
||||||
"replaygain" # write replaygain tags for automatic loudness adjustments
|
|
||||||
];
|
|
||||||
|
|
||||||
fetchart = {
|
|
||||||
auto = true;
|
|
||||||
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
|
|
||||||
};
|
|
||||||
|
|
||||||
# lyrics = {
|
|
||||||
# auto = "no"; # we need the lyrics as .lrc files, not embedded into the metadata
|
|
||||||
# synced = "yes"; # prefer synced lyrics if provided
|
|
||||||
# };
|
|
||||||
|
|
||||||
replaygain = {
|
|
||||||
auto = false; # analyze on import automatically
|
|
||||||
backend = "ffmpeg";
|
|
||||||
overwrite = true; # re-analyze files with existing replaygain tags on import
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
|
|
||||||
cava = {
|
cava = {
|
||||||
enable = true;
|
enable = !headless;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
@ -593,110 +533,11 @@ rec {
|
|||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
userEmail = "christoph.urlacher@protonmail.com";
|
|
||||||
userName = "Christoph Urlacher";
|
|
||||||
|
|
||||||
signing = {
|
|
||||||
signByDefault = true;
|
|
||||||
format = "ssh";
|
|
||||||
key = "~/.ssh/id_ed25519.pub";
|
|
||||||
};
|
|
||||||
|
|
||||||
lfs.enable = true;
|
|
||||||
diff-so-fancy = {
|
|
||||||
enable = true;
|
|
||||||
changeHunkIndicators = true;
|
|
||||||
markEmptyLines = false;
|
|
||||||
stripLeadingSymbols = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
core = {
|
|
||||||
compression = 9;
|
|
||||||
# whitespace = "error";
|
|
||||||
preloadindex = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
init = {
|
|
||||||
defaultBranch = "main";
|
|
||||||
};
|
|
||||||
|
|
||||||
gpg = {
|
|
||||||
ssh = {
|
|
||||||
allowedSignersFile = "~/.ssh/allowed_signers";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
status = {
|
|
||||||
branch = true;
|
|
||||||
showStash = true;
|
|
||||||
showUntrackedFiles = "all";
|
|
||||||
};
|
|
||||||
|
|
||||||
pull = {
|
|
||||||
default = "current";
|
|
||||||
rebase = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
push = {
|
|
||||||
autoSetupRemote = true;
|
|
||||||
default = "current";
|
|
||||||
followTags = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
rebase = {
|
|
||||||
autoStash = true;
|
|
||||||
missingCommitsCheck = "warn";
|
|
||||||
};
|
|
||||||
|
|
||||||
diff = {
|
|
||||||
context = 3;
|
|
||||||
renames = "copies";
|
|
||||||
interHunkContext = 10;
|
|
||||||
};
|
|
||||||
|
|
||||||
interactive = {
|
|
||||||
diffFilter = "${pkgs.diff-so-fancy}/bin/diff-so-fancy --patch";
|
|
||||||
singlekey = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
log = {
|
|
||||||
abbrevCommit = true;
|
|
||||||
graphColors = "blue,yellow,cyan,magenta,green,red";
|
|
||||||
};
|
|
||||||
|
|
||||||
branch = {
|
|
||||||
sort = "-committerdate";
|
|
||||||
};
|
|
||||||
|
|
||||||
tag = {
|
|
||||||
sort = "-taggerdate";
|
|
||||||
};
|
|
||||||
|
|
||||||
pager = {
|
|
||||||
branch = false;
|
|
||||||
tag = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
url = {
|
|
||||||
"ssh://git@gitea.local.chriphost.de:222/christoph/" = {
|
|
||||||
insteadOf = "gitea:";
|
|
||||||
};
|
|
||||||
"git@github.com:" = {
|
|
||||||
insteadOf = "github:";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keychain = {
|
keychain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
enableNushellIntegration = false;
|
enableNushellIntegration = false;
|
||||||
enableXsessionIntegration = true;
|
enableXsessionIntegration = !headless;
|
||||||
# agents = ["ssh"]; # Deprecated
|
# agents = ["ssh"]; # Deprecated
|
||||||
keys = ["id_ed25519"];
|
keys = ["id_ed25519"];
|
||||||
};
|
};
|
||||||
@ -765,6 +606,10 @@ rec {
|
|||||||
compression = true;
|
compression = true;
|
||||||
|
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
|
"nixinator" = {
|
||||||
|
user = "christoph";
|
||||||
|
hostname = "192.168.86.50";
|
||||||
|
};
|
||||||
"servenix" = {
|
"servenix" = {
|
||||||
user = "christoph";
|
user = "christoph";
|
||||||
hostname = "local.chriphost.de";
|
hostname = "local.chriphost.de";
|
||||||
@ -804,210 +649,6 @@ rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
yazi = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
shellWrapperName = "y";
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
inherit (pkgs.yaziPlugins) chmod diff full-border git lazygit mount ouch rsync starship sudo; # smar-paste
|
|
||||||
};
|
|
||||||
|
|
||||||
initLua = ''
|
|
||||||
-- Load plugins
|
|
||||||
require("full-border"):setup()
|
|
||||||
require("starship"):setup()
|
|
||||||
require("git"):setup()
|
|
||||||
|
|
||||||
-- Show symlink in status bar
|
|
||||||
Status:children_add(function(self)
|
|
||||||
local h = self._current.hovered
|
|
||||||
if h and h.link_to then
|
|
||||||
return " -> " .. tostring(h.link_to)
|
|
||||||
else
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
end, 3300, Status.LEFT)
|
|
||||||
|
|
||||||
-- Show user:group in status bar
|
|
||||||
Status:children_add(function()
|
|
||||||
local h = cx.active.current.hovered
|
|
||||||
if not h or ya.target_family() ~= "unix" then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return ui.Line {
|
|
||||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
|
||||||
":",
|
|
||||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
|
||||||
" ",
|
|
||||||
}
|
|
||||||
end, 500, Status.RIGHT)
|
|
||||||
'';
|
|
||||||
|
|
||||||
# https://yazi-rs.github.io/docs/configuration/yazi
|
|
||||||
# "$n": The n-th selected file (1...n)
|
|
||||||
# "$@": All selected files
|
|
||||||
# "$0": The hovered file
|
|
||||||
settings = {
|
|
||||||
mgr = {
|
|
||||||
show_hidden = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Associate mimetypes with edit/open/play actions
|
|
||||||
# open = {};
|
|
||||||
|
|
||||||
# Configure programs to edit/open/play files
|
|
||||||
opener = {
|
|
||||||
play = [
|
|
||||||
{
|
|
||||||
run = ''vlc "$@"'';
|
|
||||||
orphan = true;
|
|
||||||
desc = "Play selection";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
edit = [
|
|
||||||
{
|
|
||||||
run = ''$EDITOR "$@"'';
|
|
||||||
block = true;
|
|
||||||
desc = "Edit selection";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
open = [
|
|
||||||
{
|
|
||||||
run = ''xdg-open "$@"'';
|
|
||||||
desc = "Open selection";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extract = [
|
|
||||||
{
|
|
||||||
run = ''ouch decompress -y "$@"'';
|
|
||||||
desc = "Extract selection";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
preview = {
|
|
||||||
max_width = 1000;
|
|
||||||
max_height = 1000;
|
|
||||||
};
|
|
||||||
|
|
||||||
plugin.prepend_fetchers = [
|
|
||||||
{
|
|
||||||
id = "git";
|
|
||||||
name = "*";
|
|
||||||
run = "git";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
id = "git";
|
|
||||||
name = "*/";
|
|
||||||
run = "git";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
plugin.prepend_previewers = [
|
|
||||||
{
|
|
||||||
mime = "application/*zip";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/x-tar";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/x-bzip2";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/x-7z-compressed";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/x-rar";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/x-xz";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mime = "application/xz";
|
|
||||||
run = "ouch";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap = {
|
|
||||||
input.prepend_keymap = [
|
|
||||||
{
|
|
||||||
# Don't exit vi mode on <Esc>, but close the input
|
|
||||||
on = "<Esc>";
|
|
||||||
run = "close";
|
|
||||||
desc = "Cancel input";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
mgr.prepend_keymap = [
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "m"];
|
|
||||||
run = "plugin mount";
|
|
||||||
desc = "Manage device mounts";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "c"];
|
|
||||||
run = "plugin chmod";
|
|
||||||
desc = "Chmod selection";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "g"];
|
|
||||||
run = "plugin lazygit";
|
|
||||||
desc = "Run LazyGit";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "a"];
|
|
||||||
run = "plugin ouch";
|
|
||||||
desc = "Add selection to archive";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "d"];
|
|
||||||
run = ''shell -- ripdrag -a -n "$@"'';
|
|
||||||
desc = "Drag & drop selection";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "D"];
|
|
||||||
run = "plugin diff";
|
|
||||||
desc = "Diff the selected with the hovered file";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = ["<C-p>" "r"];
|
|
||||||
run = "plugin rsync";
|
|
||||||
desc = "Copy files using rsync";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
on = "!";
|
|
||||||
run = ''shell "$SHELL" --block'';
|
|
||||||
desc = "Open $SHELL here";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = "y";
|
|
||||||
run = [''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' "yank"];
|
|
||||||
desc = "Copy files to system clipboard on yank";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# on = "p";
|
|
||||||
# run = "plugin smart-paste";
|
|
||||||
# desc = "Paste into hovered directory or CWD";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
on = "d";
|
|
||||||
run = "remove --permanently";
|
|
||||||
desc = "Delete selection";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
yt-dlp.enable = true;
|
yt-dlp.enable = true;
|
||||||
|
|
||||||
zoxide = {
|
zoxide = {
|
||||||
@ -1022,63 +663,6 @@ rec {
|
|||||||
indicator = nixosConfig.programs.kdeconnect.enable;
|
indicator = nixosConfig.programs.kdeconnect.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
mpd = {
|
|
||||||
enable = true;
|
|
||||||
dataDir = "${home.homeDirectory}/Music/.mpd";
|
|
||||||
musicDirectory = "${home.homeDirectory}/Music";
|
|
||||||
network = {
|
|
||||||
listenAddress = "127.0.0.1"; # Listen on all addresses: "any"
|
|
||||||
port = 6600;
|
|
||||||
};
|
|
||||||
extraArgs = ["--verbose"];
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
# Refresh the database whenever files in the musicDirectory change
|
|
||||||
auto_update "yes"
|
|
||||||
|
|
||||||
# Don't start playback after startup
|
|
||||||
restore_paused "yes"
|
|
||||||
|
|
||||||
# Use track tags on shuffle and album tags on album play (auto)
|
|
||||||
# Use album's tags (album)
|
|
||||||
# Use track's tags (track)
|
|
||||||
# replaygain "auto"
|
|
||||||
|
|
||||||
# PipeWire main output
|
|
||||||
audio_output {
|
|
||||||
type "pipewire"
|
|
||||||
name "PipeWire Sound Server"
|
|
||||||
|
|
||||||
# Use hardware mixer instead of software volume filter (replaygain_handler "software")
|
|
||||||
# mixer_type "hardware"
|
|
||||||
# replay_gain_handler "mixer"
|
|
||||||
}
|
|
||||||
|
|
||||||
# FiFo output for cava visualization
|
|
||||||
audio_output {
|
|
||||||
type "fifo"
|
|
||||||
name "my_fifo"
|
|
||||||
path "/tmp/mpd.fifo"
|
|
||||||
format "44100:16:2"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Pre-cache 1GB of the queue
|
|
||||||
# input_cache {
|
|
||||||
# size "1 GB"
|
|
||||||
# }
|
|
||||||
|
|
||||||
# follow_outside_symlinks "no" # If mpd should follow symlinks pointing outside the musicDirectory
|
|
||||||
# follow_inside_symlinks "yes" # If mpd should follow symlinks pointing inside the musicDirectory
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# MPD integration with mpris (used by player-ctl).
|
|
||||||
# We want to use mpris as it also supports other players (e.g. Spotify) or browsers.
|
|
||||||
mpd-mpris = {
|
|
||||||
enable = true;
|
|
||||||
mpd.useLocal = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
flatpak = {
|
flatpak = {
|
||||||
# FlatHub stable is only added by default if no custom remotes are specified
|
# FlatHub stable is only added by default if no custom remotes are specified
|
||||||
remotes = lib.mkOptionDefault [
|
remotes = lib.mkOptionDefault [
|
||||||
@ -1092,19 +676,22 @@ rec {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
packages = [
|
packages = lib.mkMerge [
|
||||||
"com.github.tchx84.Flatseal"
|
[]
|
||||||
|
(lib.mkIf (!headless) [
|
||||||
|
"com.github.tchx84.Flatseal"
|
||||||
|
|
||||||
"com.spotify.Client" # Don't need this when spicetify is enabled
|
"com.spotify.Client" # Don't need this when spicetify is enabled
|
||||||
|
|
||||||
# NOTE: Also change discord-ipc-0 below
|
# NOTE: Also change discord-ipc-0 below
|
||||||
"com.discordapp.Discord"
|
"com.discordapp.Discord"
|
||||||
# "com.discordapp.DiscordCanary"
|
# "com.discordapp.DiscordCanary"
|
||||||
# "dev.vencord.Vesktop"
|
# "dev.vencord.Vesktop"
|
||||||
|
|
||||||
# "com.google.Chrome"
|
# "com.google.Chrome"
|
||||||
# "md.obsidian.Obsidian" # NOTE: Installed via package
|
# "md.obsidian.Obsidian" # NOTE: Installed via package
|
||||||
# "io.anytype.anytype"
|
# "io.anytype.anytype"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
uninstallUnmanaged = true;
|
uninstallUnmanaged = true;
|
||||||
@ -1148,10 +735,20 @@ rec {
|
|||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
user = {
|
user = {
|
||||||
tmpfiles.rules = [
|
tmpfiles.rules = lib.mkMerge [
|
||||||
# Fix Discord rich presence for Flatpak
|
[]
|
||||||
"L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0"
|
(lib.mkIf (mylib.modules.contains
|
||||||
# "L %t/discord-ipc-0 - - - - app/com.discordapp.DiscordCanary/discord-ipc-0"
|
config.services.flatpak.packages
|
||||||
|
"com.discordapp.Discord") [
|
||||||
|
# Fix Discord rich presence for Flatpak
|
||||||
|
"L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0"
|
||||||
|
])
|
||||||
|
(lib.mkIf (mylib.modules.contains
|
||||||
|
config.services.flatpak.packages
|
||||||
|
"com.discordapp.DiscordCanary") [
|
||||||
|
# Fix Discord rich presence for Flatpak
|
||||||
|
"L %t/discord-ipc-0 - - - - app/com.discordapp.DiscordCanary/discord-ipc-0"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
|
Reference in New Issue
Block a user