From 373d1e1fe87bd853b8a30a34d241e3371e18f574 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Wed, 8 Jan 2025 12:26:39 -0800 Subject: [PATCH] Fix: General home-manager.users."${sys.username}".home.shellAliases loading too late; breaks running "fetch" in zsh.initExtra --- .../systems/desktop/terminal-environment.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dotfiles/systems/desktop/terminal-environment.nix b/dotfiles/systems/desktop/terminal-environment.nix index d9bc2bd7..6ec677c8 100644 --- a/dotfiles/systems/desktop/terminal-environment.nix +++ b/dotfiles/systems/desktop/terminal-environment.nix @@ -1,4 +1,11 @@ -{ sys, pkgs, usr, flake, ... }: { +{ sys, pkgs, usr, flake, ... }: let + aliases = { + cat = "bat --paging=never --color=always"; + ls = "eza"; + tree = "eza --tree"; + fetch = "fastfetch"; + }; +in { users.users."${sys.username}".shell = pkgs.${sys.shellPackage}; programs."${sys.shellPackage}".enable = true; home-manager.users."${sys.username}" = { @@ -309,12 +316,7 @@ }; }; - home.shellAliases = { - cat = "bat --paging=never --color=always"; - ls = "eza"; - tree = "eza --tree"; - fetch = "fastfetch"; - }; + home.shellAliases = aliases; programs.zsh = { enable = true; @@ -322,6 +324,7 @@ enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; + shellAliases = aliases; history = { share = true; save = 10000; @@ -352,6 +355,5 @@ fetch ''; }; - }; } \ No newline at end of file