Merge branch 'main' of ssh://codeberg.org/dnscio/nix-config

This commit is contained in:
Dennis 2026-01-12 10:11:50 +01:00
commit dc095a1163
12 changed files with 158 additions and 120 deletions

36
flake.lock generated
View file

@ -66,11 +66,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1767585814,
"narHash": "sha256-7iodv57Ppq05AHVKnS9/IdhhgBYTVpTDZmz2u2enr/E=",
"lastModified": 1768033395,
"narHash": "sha256-fLLap7Ns/9JHmeEjRXYYW42CoJxeVwTql++rrUdwAX8=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "66bfeb87deb83ca2f9fa2045704b72de52c6433a",
"rev": "3ba4e1bf942b39d572f06b4939566eeb2624288f",
"type": "gitlab"
},
"original": {
@ -108,11 +108,11 @@
]
},
"locked": {
"lastModified": 1767556355,
"narHash": "sha256-RDTUBDQBi9D4eD9iJQWtUDN/13MDLX+KmE+TwwNUp2s=",
"lastModified": 1768018810,
"narHash": "sha256-WREj1ZQ2wSGtyPAhQJ3SX/7PJ29PNKv04h/7NgqUS+M=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f894bc4ffde179d178d8deb374fcf9855d1a82b7",
"rev": "7c5d9345ad7cc38832cd4007f5cd03daad64d75b",
"type": "github"
},
"original": {
@ -167,11 +167,11 @@
]
},
"locked": {
"lastModified": 1767028240,
"narHash": "sha256-0/fLUqwJ4Z774muguUyn5t8AQ6wyxlNbHexpje+5hRo=",
"lastModified": 1767718503,
"narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "c31afa6e76da9bbc7c9295e39c7de9fca1071ea1",
"rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1",
"type": "github"
},
"original": {
@ -217,11 +217,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767480499,
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
"lastModified": 1767799921,
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
"type": "github"
},
"original": {
@ -261,11 +261,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1767364772,
"narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=",
"lastModified": 1767995494,
"narHash": "sha256-2EwKigq/8Yfl0D1+BaqsF1qh40DxX+rDdDyw1razX/Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa",
"rev": "45a1530683263666f42d1de4cdda328109d5a676",
"type": "github"
},
"original": {
@ -407,11 +407,11 @@
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1767568852,
"narHash": "sha256-6s8hL3YX9zAq2T7qvcwwzaEVwc9MEYbW+C2LcAAQfbk=",
"lastModified": 1768052363,
"narHash": "sha256-+oWdj611bRY290wkkQCQFPYToGgPhOxpF1RLco3pLOg=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "350c729b261e6f5529460140a5f0943dd4c5e156",
"rev": "6cc402ae032b7be1705da52b15e4e68f7331c4c1",
"type": "github"
},
"original": {

View file

@ -18,8 +18,8 @@
../modules/zoxide
../modules/fish
../modules/nvim
../modules/tmux
../modules/ghostty
../modules/zellij
../modules/lazygit
];

View file

@ -39,6 +39,7 @@
krita
gpustat
librewolf
tmux
];
imports = [
@ -49,8 +50,7 @@
../modules/nvim
../modules/ghostty/linux.nix
../modules/fish
../modules/zellij
../modules/mpv
../modules/tmux
../modules/zen
../modules/wm/swaync
../modules/wm/cliphist

View file

@ -27,9 +27,7 @@
# Device specific overlays
# Overlays for all devices are defined
# in modules/default.nix
nixpkgs.overlays = [
inputs.zellij-switch.overlays.default
];
nixpkgs.overlays = [];
# System Packages
environment.systemPackages = lib.mkAfter (
@ -38,9 +36,8 @@
yt-dlp
fnm
devenv
zellij
zellij-switch
rsync
tmux
]
);
@ -51,6 +48,7 @@
"Yesterday For Old Reddit" = 1603279883;
"Final Cut Pro" = 424389933;
Wireguard = 1451685025;
Pages = 409201541;
};
homebrew.brews = lib.mkAfter ([

View file

@ -28,7 +28,6 @@
# Overlays for all devices are defined
# in flake.nix
nixpkgs.overlays = [
inputs.zellij-switch.overlays.default
(final: prev: {
python3Packages = prev.python3Packages // {
python-dbusmock =
@ -70,13 +69,7 @@
};
# System Packages
environment.systemPackages = lib.mkAfter (
with pkgs;
[
zellij
zellij-switch
]
);
environment.systemPackages = lib.mkAfter (with pkgs; [ ]);
# Enable some services that do not need configuration
services.openssh.enable = true;

View file

@ -14,16 +14,6 @@
kill_tunnels = /* fish */ ''
ps -o pid,command | grep "^[0-9]\{4,5\} ssh -NL" | awk '{print $1}' | xargs kill -9
'';
fzf = /* fish */ ''
set -Ux FZF_DEFAULT_OPTS "
--color=fg:#ffffff,bg:#0d0e1c,hl:#ef8386
--color=fg+:#ffffff,bg+:#1d2235,hl+:#ef8386
--color=border:#61647a,header:#88ca9f,gutter:#0d0e1c
--color=spinner:#fec43f,info:#00bcff
--color=pointer:#feacd0,marker:#ff5f59,prompt:#9ac8e0"
command fzf
'';
dev_projects = /* fish */ ''
if test "$hn" = "dnsc-work"
begin
@ -38,7 +28,10 @@
echo "$HOME/dev/ride/apps/packages";
end
else
fd . ~/dev -t d -d 1
begin
echo "$HOME/notes"
fd . ~/dev -t d -d 1
end
end
'';
cdd = /* fish */ ''
@ -66,19 +59,38 @@
end
end
'';
_sessionizer_list = /* fish */ ''
# Get existing tmux sessions if tmux is running
if tmux list-sessions >/dev/null 2>&1
tmux list-sessions -F '#{session_name}'
end
# Add development projects
dev_projects
'';
sessionizer = /* fish */ ''
set -l selected (dev_projects | fzf --prompt "Create/switch to session: ")
set -l selected (_sessionizer_list | fzf --prompt "Create/switch to session: " --header " Ctrl-d: Kill Session " --bind "ctrl-d:execute(tmux kill-session -t basename {})+reload(dev_projects)")
if test -z "$selected"
return 1
end
set -l session_name (basename $selected)
set -l tmux_running (pgrep tmux)
if test $ZELLIJ -eq 0
zellij pipe --plugin file:/run/current-system/sw/bin/zellij-switch.wasm -- "--session $session_name --cwd $selected --layout default"
else
zellij attach "$session_name" --create
if test -z $TMUX && test -z $tmux_running
tmux new-session -s $session_name -c $selected
return 0
end
if not tmux has-session -t=$session_name 2> /dev/null
tmux new-session -ds $session_name -c $selected
end
tmux switch-client -t $session_name
'';
tmux_sessionizer = /* fish */ ''
tmux display-popup -h 50% -w 80% -E sessionizer
'';
nn = /* fish */ ''
# Require a title argument
@ -204,9 +216,9 @@
# Set some global values
set -x GPG_TTY (tty)
set hn (prompt_hostname)
set fish_cursor_default block blink
fish_vi_key_bindings insert
fish_vi_cursor xterm
setup_winterly_theme_colors
setup_env
@ -219,6 +231,17 @@
# Third party integration not covered by
# home manager's enableFishIntegration
fnm env --use-on-cd --shell fish | source
# Auto start tmux
if status is-interactive; and not set -q TMUX
if tmux list-sessions >/dev/null 2>&1
# Attach to the first available session
tmux attach-session
else
# Create a new session
tmux new-session -t default
end
end
'';
shellAbbrs = {

View file

@ -1,27 +0,0 @@
{ pkgs, ... }:
{
programs.mpv = {
enable = true;
package = (
pkgs.mpv-unwrapped.wrapper {
scripts = with pkgs.mpvScripts; [
uosc
sponsorblock
mpris
mpv-notify-send
];
mpv = pkgs.mpv-unwrapped.override {
waylandSupport = true;
};
}
);
config = {
profile = "high-quality";
ytdl-format = "bestvideo+bestaudio";
cache-default = 4000000;
};
};
}

View file

@ -1,4 +1,5 @@
{
programs.gamemode.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play

74
modules/tmux/default.nix Normal file
View file

@ -0,0 +1,74 @@
{
pkgs,
...
}:
{
programs.tmux = {
enable = true;
package = pkgs.tmux;
baseIndex = 1;
clock24 = true;
disableConfirmationPrompt = true;
mouse = true;
newSession = true;
prefix = "C-b";
shell = "${pkgs.fish}/bin/fish";
terminal = "screen-256color";
keyMode = "vi";
escapeTime = 0;
plugins = with pkgs; [
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
'';
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-save-interval '10'
'';
}
];
extraConfig = ''
set -g status-position top
set -g status-style bg=#1d202f,fg=white
set -g status-left " "
set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H "
set -g window-status-current-style bg=default,fg=magenta,bold
set-window-option -g window-status-format "[#I] #W#F"
set-window-option -g window-status-current-format "[#I] #W#F"
set -g pane-border-style fg=gray
set -g pane-active-border-style fg=magenta
unbind %
bind "|" split-window -h
unbind '"'
bind - split-window -l 15 -v
bind r source-file "~/.config/tmux/tmux.conf"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind ? list-keys -a
unbind s
bind s display-popup -h 50% -w 80% -E sessionizer
unbind v
bind v choose-tree -Zw "join-pane -t '%%'"
'';
};
}

View file

@ -325,53 +325,21 @@ binds {
Mod+K { focus-window-or-workspace-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+L { move-column-right; }
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Shift+H { move-column-left; }
Mod+Shift+J { move-column-to-workspace-down; }
Mod+Shift+K { move-column-to-workspace-up; }
Mod+Shift+L { move-column-right; }
Mod+A { focus-column-first; }
Mod+E { focus-column-last; }
Mod+Ctrl+A { move-column-to-first; }
Mod+Ctrl+E { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
// Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
// Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
// Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
// Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
// Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
// Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
// Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
// Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+D { focus-workspace-down; }
Mod+U { focus-workspace-up; }
Mod+Ctrl+D { move-column-to-workspace-down; }
Mod+Ctrl+U { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }

View file

@ -12,6 +12,14 @@ keybinds clear-defaults=true {
bind "/" { SwitchToMode "Scroll"; }
// Plugins / Tools
bind "q" {
LaunchOrFocusPlugin "plugin-manager" {
floating true
move_to_focused_tab true
};
SwitchToMode "Locked";
}
bind "w" {
LaunchOrFocusPlugin "session-manager" {
floating true
@ -306,11 +314,12 @@ plugins {
}
load_plugins {
"https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm"
}
simplified_ui false
default_mode "locked"
default_shell "fish"
default_layout "compact"
pane_frames true
scroll_buffer_size 100000
copy_on_select true
@ -320,4 +329,3 @@ session_serialization true
pane_viewport_serialization true
web_server false
show_startup_tips false
default_layout "compact"

View file

@ -1,12 +1,12 @@
{ config, ... }:
{ config, pkgs, ... }:
{
xdg.configFile."zellij/config.kdl" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/zellij/config.kdl";
};
xdg.configFile."zellij/layouts" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/zellij/layouts";
};
# xdg.configFile."zellij/layouts/default.kdl" = {
# source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/zellij/layouts/default.kdl";
# };
programs.zellij = {
enable = true;