From 2c2f8174598e481c0bc090a3f1c2b866f071d30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 4 Feb 2026 08:30:19 +0100 Subject: [PATCH] bundle modules --- flake.nix | 7 ++---- modules/{niri.nix => desktop.nix} | 0 modules/{ => shell}/bash.nix | 0 modules/shell/default.nix | 8 +++++++ modules/shell/tmux.nix | 38 +++++++++++++++++++++++++++++++ modules/{ => shell}/tools.nix | 37 ------------------------------ modules/{ => shell}/zsh.nix | 0 7 files changed, 48 insertions(+), 42 deletions(-) rename modules/{niri.nix => desktop.nix} (100%) rename modules/{ => shell}/bash.nix (100%) create mode 100644 modules/shell/default.nix create mode 100644 modules/shell/tmux.nix rename modules/{ => shell}/tools.nix (80%) rename modules/{ => shell}/zsh.nix (100%) diff --git a/flake.nix b/flake.nix index a38c92b..f939b9d 100644 --- a/flake.nix +++ b/flake.nix @@ -25,14 +25,11 @@ { nixosModules = { editor = modules/editor.nix; - zsh = modules/zsh.nix; git = modules/git.nix; udiskie = modules/udiskie.nix; - niri = modules/niri.nix; - bash = modules/bash.nix; + desktop = modules/desktop.nix; nix = modules/nix.nix; - - tools = modules/tools.nix; + shell = modules/shell; }; overlays.default = final: prev: { diff --git a/modules/niri.nix b/modules/desktop.nix similarity index 100% rename from modules/niri.nix rename to modules/desktop.nix diff --git a/modules/bash.nix b/modules/shell/bash.nix similarity index 100% rename from modules/bash.nix rename to modules/shell/bash.nix diff --git a/modules/shell/default.nix b/modules/shell/default.nix new file mode 100644 index 0000000..22f52b9 --- /dev/null +++ b/modules/shell/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./tools.nix + ./bash.nix + ./zsh.nix + ./tmux.nix + ]; +} diff --git a/modules/shell/tmux.nix b/modules/shell/tmux.nix new file mode 100644 index 0000000..d10e672 --- /dev/null +++ b/modules/shell/tmux.nix @@ -0,0 +1,38 @@ +{ + programs.tmux = { + enable = true; + keyMode = "vi"; + clock24 = true; + terminal = "screen-256color"; + baseIndex = 1; + aggressiveResize = true; + escapeTime = 50; + historyLimit = 7000; + shortcut = "b"; + extraConfig = '' + set -g mouse on + + unbind * + bind * list-clients + + # naVIgate + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + + # Use C-h and C-l to cycle through panes + bind -r C-h select-window -t :- + bind -r C-l select-window -t :+ + + setw -g monitor-activity on + set -g visual-activity on + + set -g status-interval 2 + set -g status-left-length 32 + set -g status-right-length 150 + + set -g status-position bottom + ''; + }; +} diff --git a/modules/tools.nix b/modules/shell/tools.nix similarity index 80% rename from modules/tools.nix rename to modules/shell/tools.nix index b75cf5d..38f73a4 100644 --- a/modules/tools.nix +++ b/modules/shell/tools.nix @@ -134,41 +134,4 @@ in uj = "${pkgs.systemd}/bin/journalctl --user"; } ); - - programs.tmux = { - enable = true; - keyMode = "vi"; - clock24 = true; - terminal = "screen-256color"; - baseIndex = 1; - aggressiveResize = true; - escapeTime = 50; - historyLimit = 7000; - shortcut = "b"; - extraConfig = '' - set -g mouse on - - unbind * - bind * list-clients - - # naVIgate - bind h select-pane -L - bind j select-pane -D - bind k select-pane -U - bind l select-pane -R - - # Use C-h and C-l to cycle through panes - bind -r C-h select-window -t :- - bind -r C-l select-window -t :+ - - setw -g monitor-activity on - set -g visual-activity on - - set -g status-interval 2 - set -g status-left-length 32 - set -g status-right-length 150 - - set -g status-position bottom - ''; - }; } diff --git a/modules/zsh.nix b/modules/shell/zsh.nix similarity index 100% rename from modules/zsh.nix rename to modules/shell/zsh.nix