From 43546073cfe64886ac6a6c11a2ccf702448f1b5d Mon Sep 17 00:00:00 2001 From: Bun Date: Mon, 2 Jun 2025 16:47:10 -0400 Subject: [PATCH] Add lingering, remove kill on exit, fix smallfetch, replace tmux with zellij --- modules/home/programs/terminal/default.nix | 2 +- .../terminal/fastfetch/smallfetch/default.nix | 2 +- .../home/programs/terminal/tmux/default.nix | 24 ------------------- .../home/programs/terminal/zellij/default.nix | 13 ++++++++++ modules/system/settings/logind/default.nix | 1 - modules/system/users/main/default.nix | 1 + 6 files changed, 16 insertions(+), 27 deletions(-) delete mode 100644 modules/home/programs/terminal/tmux/default.nix create mode 100644 modules/home/programs/terminal/zellij/default.nix diff --git a/modules/home/programs/terminal/default.nix b/modules/home/programs/terminal/default.nix index 43a041ea..5fbad56b 100644 --- a/modules/home/programs/terminal/default.nix +++ b/modules/home/programs/terminal/default.nix @@ -14,8 +14,8 @@ ./nix-index ./ranger ./ssh - ./tmux ./yt-dlp + ./zellij ./zoxide ./zsh ]; diff --git a/modules/home/programs/terminal/fastfetch/smallfetch/default.nix b/modules/home/programs/terminal/fastfetch/smallfetch/default.nix index 7fe46f91..fcd5fddd 100644 --- a/modules/home/programs/terminal/fastfetch/smallfetch/default.nix +++ b/modules/home/programs/terminal/fastfetch/smallfetch/default.nix @@ -3,7 +3,7 @@ home.packages = with pkgs; with lib; with config.home; with config.xdg; [ (writeScriptBin "smallfetch" '' #!/bin/sh - fastfetch --config ${removePrefix "${homeDirectory}/" configHome}/fastfetch/small.jsonc + fastfetch --config $HOME/${removePrefix "${homeDirectory}/" configHome}/fastfetch/small.jsonc '') ]; diff --git a/modules/home/programs/terminal/tmux/default.nix b/modules/home/programs/terminal/tmux/default.nix deleted file mode 100644 index 338fa76e..00000000 --- a/modules/home/programs/terminal/tmux/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ ... }: -{ - programs.tmux = { - enable = true; - keyMode = "vi"; - mouse = true; - terminal = "st-256color"; - historyLimit = 4096; - baseIndex = 1; - extraConfig = '' - set -g status on - set -g status-left "" - set -g status-position bottom - set -g status-right "#[bg=brightblack]#[fg=dark_purple] #T " - set -g status-style "bg=black" - - set -g set-titles on - set -g set-titles-string "#T" - - setw -g window-status-format "#[bg=brightmagenta]#[fg=black] #I #[bg=brightblack]#[fg=white] #W " - setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=white]#[fg=black] #W " - ''; - }; -} diff --git a/modules/home/programs/terminal/zellij/default.nix b/modules/home/programs/terminal/zellij/default.nix new file mode 100644 index 00000000..e37bff8e --- /dev/null +++ b/modules/home/programs/terminal/zellij/default.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: +{ + programs.zellij = { + enable = true; + attachExistingSession = true; + }; + + home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = + with lib; with config.home; with config.xdg; [ + "state/${removePrefix "${homeDirectory}/" cacheHome}/zellij" + "state/${removePrefix "${homeDirectory}/" configHome}/zellij" + ]; +} diff --git a/modules/system/settings/logind/default.nix b/modules/system/settings/logind/default.nix index a5b4471f..4df55cd5 100644 --- a/modules/system/settings/logind/default.nix +++ b/modules/system/settings/logind/default.nix @@ -1,7 +1,6 @@ { config, lib, ... }: { services.logind = { - killUserProcesses = true; powerKey = lib.mkIf config.system.desktop.enable "suspend"; powerKeyLongPress = "reboot"; }; diff --git a/modules/system/users/main/default.nix b/modules/system/users/main/default.nix index c306192a..7c65165f 100644 --- a/modules/system/users/main/default.nix +++ b/modules/system/users/main/default.nix @@ -10,6 +10,7 @@ users.users."${config.sysusers.main}" = { isNormalUser = true; createHome = true; + linger = true; hashedPassword = config.secrets.accPass.main; openssh.authorizedKeys.keyFiles = [ ../../../../hosts/tower/id_ed25519.pub