From 5a7cc845f1718e73967b6408b9ed1d257d4d9c5e Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Wed, 17 Jul 2024 14:07:30 +1000 Subject: [PATCH] Use home.shellAliases instead of setting for each shell Home Manager includes a way to apply shellAliases to all compatible shells, it seems. --- flake.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index d2ecfef..dde1b25 100644 --- a/flake.nix +++ b/flake.nix @@ -155,18 +155,17 @@ homeModules = { # Common home-manager configuration shared between Linux and macOS. common = { pkgs, system, ... }: - let - shellAliases = { + { + imports = [ + inputs.nixvim.homeManagerModules.nixvim + ]; + + home.shellAliases = { "g" = "git"; "l" = "ls"; "ll" = "ls -la"; "arst" = "asdf"; # Colemak home row }; - in - { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ]; programs.nixvim = { enable = true; @@ -219,7 +218,6 @@ }; programs.starship.enable = true; programs.bash.enable = true; - programs.bash.shellAliases = shellAliases; # difftastic will show syntactical/structural changes in diffs # programs.git.difftastic.enable = true; @@ -240,7 +238,6 @@ autocd = true; syntaxHighlighting.enable = true; autosuggestion.enable = true; - inherit shellAliases; }; programs.direnv.enable = true;