Compare commits
2 Commits
efce5c6293
...
1adacf5e1e
| Author | SHA1 | Date | |
|---|---|---|---|
|
1adacf5e1e
|
|||
|
e53787deae
|
@ -8,7 +8,9 @@
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
config = let
|
||||
inherit (config.homemodules) color;
|
||||
in {
|
||||
paths = rec {
|
||||
nixflake = "${config.home.homeDirectory}/NixFlake";
|
||||
dotfiles = "${nixflake}/config";
|
||||
@ -72,6 +74,7 @@
|
||||
unzip
|
||||
progress
|
||||
tokei
|
||||
nix-search-tv
|
||||
nix-tree
|
||||
just
|
||||
|
||||
@ -105,10 +108,74 @@
|
||||
stateVersion = "25.11";
|
||||
};
|
||||
|
||||
# TODO: Deduplicate with other configs
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
# TODO: Module
|
||||
bat = {
|
||||
enable = true;
|
||||
|
||||
themes = {
|
||||
catppuccin-latte = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-latte.tmTheme";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
theme = "catppuccin-latte";
|
||||
};
|
||||
};
|
||||
|
||||
cava = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
framerate = 60; # default 60
|
||||
autosens = 1; # default 1
|
||||
sensitivity = 100; # default 100
|
||||
lower_cutoff_freq = 50; # not passed to cava if not provided
|
||||
higher_cutoff_freq = 10000; # not passed to cava if not provided
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
noise_reduction = 77; # default 77
|
||||
monstercat = false; # default false
|
||||
waves = false; # default false
|
||||
};
|
||||
|
||||
color = {
|
||||
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||
gradient = 1;
|
||||
|
||||
gradient_color_1 = "'${color.hexS.teal}'";
|
||||
gradient_color_2 = "'${color.hexS.sky}'";
|
||||
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||
gradient_color_4 = "'${color.hexS.blue}'";
|
||||
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||
gradient_color_6 = "'${color.hexS.pink}'";
|
||||
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||
gradient_color_8 = "'${color.hexS.red}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
fastfetch = {
|
||||
enable = true;
|
||||
|
||||
@ -257,6 +324,111 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
fd.enable = true;
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
keychain = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
enableXsessionIntegration = false;
|
||||
keys = ["id_ed25519"];
|
||||
};
|
||||
|
||||
navi = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = true;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
"nixinator" = {
|
||||
user = "christoph";
|
||||
hostname = "192.168.86.50";
|
||||
};
|
||||
"servenix" = {
|
||||
user = "christoph";
|
||||
hostname = "local.chriphost.de";
|
||||
};
|
||||
"thinknix" = {
|
||||
user = "christoph";
|
||||
hostname = "think.chriphost.de";
|
||||
};
|
||||
"vps" = {
|
||||
user = "root";
|
||||
hostname = "vps.chriphost.de";
|
||||
};
|
||||
"mars" = {
|
||||
user = "smchurla";
|
||||
hostname = "mars.cs.tu-dortmund.de";
|
||||
serverAliveInterval = 60;
|
||||
localForwards = [
|
||||
{
|
||||
# Resultbrowser
|
||||
bind.port = 22941;
|
||||
host.address = "127.0.0.1";
|
||||
host.port = 22941;
|
||||
}
|
||||
{
|
||||
# Mysql
|
||||
bind.port = 3306;
|
||||
host.address = "127.0.0.1";
|
||||
host.port = 3306;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
escapeTime = 0; # Delay after pressing escape
|
||||
# keyMode = "vi";
|
||||
terminal = "xterm-256color";
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set -g default-terminal "xterm-256color"
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
'';
|
||||
};
|
||||
|
||||
yt-dlp.enable = true;
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
@ -300,7 +300,6 @@ in
|
||||
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
|
||||
binsider # Analyze binaries
|
||||
lazyjournal # Journalctl viewer
|
||||
systemctl-tui
|
||||
restic # Backups
|
||||
@ -757,7 +756,7 @@ in
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
escapeTime = 0; # Delay after pressing escape
|
||||
|
||||
@ -43,6 +43,23 @@ in {
|
||||
'';
|
||||
|
||||
programs.fish = lib.mkMerge [
|
||||
# Darwin exclusive config
|
||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||
shellAbbrs = let
|
||||
# These can be used for my config.homemodules and for HM config.programs,
|
||||
# as both of these add the package to home.packages
|
||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||
|
||||
# Only add fish abbr if package is installed
|
||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
}
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
];
|
||||
})
|
||||
|
||||
# Linux exclusive config
|
||||
(lib.mkIf pkgs.stdenv.isLinux {
|
||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||
@ -110,12 +127,8 @@ in {
|
||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||
|
||||
# Tools
|
||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||
cdd = "zi";
|
||||
b = "z -"; # jump to previous dir
|
||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||
nps = "nps -e";
|
||||
nd = "nix develop";
|
||||
nb = "nix build -L";
|
||||
ns = "nix shell nixpkgs#";
|
||||
@ -134,11 +147,6 @@ in {
|
||||
|
||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
# (abbrify pkgs.sd {sed = "sd";})
|
||||
];
|
||||
})
|
||||
@ -163,9 +171,17 @@ in {
|
||||
mkdir = "mkdir -p"; # also create parents (-p)
|
||||
watch = "watch -d -c -n 0.5";
|
||||
sy = "sudo -u ${username} yazi";
|
||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||
cdd = "zi";
|
||||
b = "z -"; # jump to previous dir
|
||||
nps = "nps -e";
|
||||
}
|
||||
|
||||
# Abbrs only available if package is installed
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
(abbrify pkgs.duf {
|
||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||
|
||||
Reference in New Issue
Block a user