From 70541b269860365446ca7a5bc66c7c9b1664bab9 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 27 Aug 2026 20:44:59 +0200 Subject: [PATCH] added nh --- home/lukas/common/nh.nix | 8 ++++ home/lukas/common/shell.nix | 53 ++++++++++++++++++++------ home/lukas/laptop/default.nix | 3 +- home/lukas/tower/default.nix | 3 +- hosts/segfault-tower/configuration.nix | 2 +- 5 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 home/lukas/common/nh.nix diff --git a/home/lukas/common/nh.nix b/home/lukas/common/nh.nix new file mode 100644 index 0000000..8778255 --- /dev/null +++ b/home/lukas/common/nh.nix @@ -0,0 +1,8 @@ +{ + programs.nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/lukas/nixos"; # sets NH_OS_FLAKE variable for you + }; +} diff --git a/home/lukas/common/shell.nix b/home/lukas/common/shell.nix index 32719bb..4a6e60d 100644 --- a/home/lukas/common/shell.nix +++ b/home/lukas/common/shell.nix @@ -6,33 +6,64 @@ dotDir = config.home.homeDirectory; enableCompletion = true; syntaxHighlighting.enable = true; - autosuggestion.enable = true; + + autosuggestion = { + enable = true; + + strategy = [ + "history" + "completion" + ]; + }; + + historySubstringSearch.enable = true; + + history = { + size = 100000; + save = 100000; + + ignoreDups = true; + ignoreAllDups = true; + saveNoDups = true; + findNoDups = true; + + # Make new commands visible in other open terminals. + share = true; + + # Store timestamps and durations. + extended = true; + }; initContent = "source /etc/nixos/home/lukas/common/p10k.zsh"; sessionVariables = { POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = "true"; + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=8"; + ZSH_AUTOSUGGEST_STRATEGY = "history completion"; }; - - zplug = { enable = true; plugins = [ - { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } + { + name = "romkatv/powerlevel10k"; + tags = [ + "as:theme" + "depth:1" + ]; + } ]; }; shellAliases = { ".." = "cd .."; - ls = "eza --icons"; # plain directory listing - ll = "eza --icons -alh --git"; # long list, all, human, git status - la = "eza --icons -a"; # show all dot-files, short - lt = "eza -T --icons --git-ignore --level=4"; # pretty tree, two levels deep + ls = "eza --icons"; # plain directory listing + ll = "eza --icons -alh --git"; # long list, all, human, git status + la = "eza --icons -a"; # show all dot-files, short + lt = "eza -T --icons --git-ignore --level=4"; # pretty tree, two levels deep - cat ="bat --style=plain --pager=cat"; # pretty ‘cat’ - less ="bat --style=plain --pager=less"; # pretty ‘less’ + cat = "bat --style=plain --pager=cat"; # pretty ‘cat’ + less = "bat --style=plain --pager=less"; # pretty ‘less’ }; }; } - diff --git a/home/lukas/laptop/default.nix b/home/lukas/laptop/default.nix index 2129558..ae2a89f 100644 --- a/home/lukas/laptop/default.nix +++ b/home/lukas/laptop/default.nix @@ -9,11 +9,12 @@ ../common/alacritty.nix ../common/tmux.nix ../common/xgd.nix + ../common/nh.nix ../common/libreoffice.nix ]; home.username = "lukas"; home.homeDirectory = "/home/lukas"; - home.stateVersion = "25.05"; + home.stateVersion = "26.05"; } diff --git a/home/lukas/tower/default.nix b/home/lukas/tower/default.nix index 2129558..18701cb 100644 --- a/home/lukas/tower/default.nix +++ b/home/lukas/tower/default.nix @@ -8,12 +8,13 @@ ../common/shell.nix ../common/alacritty.nix ../common/tmux.nix + ../common/nh.nix ../common/xgd.nix ../common/libreoffice.nix ]; home.username = "lukas"; home.homeDirectory = "/home/lukas"; - home.stateVersion = "25.05"; + home.stateVersion = "26.05"; } diff --git a/hosts/segfault-tower/configuration.nix b/hosts/segfault-tower/configuration.nix index 5259d32..1b9fb80 100644 --- a/hosts/segfault-tower/configuration.nix +++ b/hosts/segfault-tower/configuration.nix @@ -44,6 +44,6 @@ nixpkgs.config.allowUnfree = true; # Version festlegen - system.stateVersion = "25.05"; + system.stateVersion = "26.05"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; }