diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index 80a08c2..f2def60 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -44,7 +44,7 @@ "scanner" "docker" ]; - shell = pkgs.zsh; + shell = pkgs.nushell; home = "/home/thegeneralist"; homeMode = "0750"; hashedPasswordFile = config.age.secrets.password.path; diff --git a/modules/common/packages.nix b/modules/common/packages.nix index 5abdf00..c567bed 100644 --- a/modules/common/packages.nix +++ b/modules/common/packages.nix @@ -39,6 +39,8 @@ in { vivid ripgrep yazi + lazygit + yaziPlugins.lazygit jq yq-go eza diff --git a/modules/common/ripgrep.nix b/modules/common/ripgrep.nix index 15137c7..9a7f4f7 100644 --- a/modules/common/ripgrep.nix +++ b/modules/common/ripgrep.nix @@ -2,6 +2,8 @@ environment.shellAliases = { todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; todos = /* sh */ "nvim ~/todo.md"; + bgr = "batgrep"; + brg = "batgrep"; }; home-manager.sharedModules = [{ diff --git a/modules/common/shell/0_nushell.nix b/modules/common/shell/0_nushell.nix index ffa8f6f..9810890 100644 --- a/modules/common/shell/0_nushell.nix +++ b/modules/common/shell/0_nushell.nix @@ -1,35 +1,70 @@ -{ config, lib, pkgs, ... }: let - inherit (lib) attrNames attrValues const filterAttrs flatten listToAttrs mapAttrs mapAttrsToList readFile replaceStrings; +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib) + attrNames + attrValues + const + filterAttrs + flatten + listToAttrs + mapAttrs + mapAttrsToList + readFile + replaceStrings + ; package = pkgs.nushell; -in { - home-manager.sharedModules = [(homeArgs: let - config' = homeArgs.config; +in +{ + home-manager.sharedModules = [ + ( + homeArgs: + let + config' = homeArgs.config; - environmentVariables = let - variablesMap = config'.variablesMap - |> mapAttrsToList (name: value: [ - { name = "\$${name}"; inherit value; } - { name = "\${${name}}"; inherit value; } - ]) - |> flatten - |> listToAttrs; - in config.environment.variables - |> mapAttrs (const <| replaceStrings (attrNames variablesMap) (attrValues variablesMap)) - |> filterAttrs (name: const <| name != "TERM"); - in { - shells."0" = package; + environmentVariables = + let + variablesMap = + config'.variablesMap + |> mapAttrsToList ( + name: value: [ + { + name = "\$${name}"; + inherit value; + } + { + name = "\${${name}}"; + inherit value; + } + ] + ) + |> flatten + |> listToAttrs; + in + config.environment.variables + |> mapAttrs (const <| replaceStrings (attrNames variablesMap) (attrValues variablesMap)) + |> filterAttrs (name: const <| name != "TERM"); + in + { + shells."0" = package; - programs.nushell = { - enable = true; - inherit package; + programs.nushell = { + enable = true; + inherit package; - inherit environmentVariables; + inherit environmentVariables; - shellAliases = config.environment.shellAliases - |> filterAttrs (_: value: value != null); + shellAliases = + config.environment.shellAliases // { ls = "ls"; }; - configFile.text = readFile ./0_nushell.nu; - }; - })]; + configFile.text = readFile ./0_nushell.nu; + }; + } + ) + ]; } diff --git a/modules/linux/shell/default.nix b/modules/linux/shell/default.nix index b06e7f2..461c2d5 100644 --- a/modules/linux/shell/default.nix +++ b/modules/linux/shell/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: let - inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce unique; + inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList unique; in { users.defaultUserShell = pkgs.zsh; @@ -10,8 +10,8 @@ in { |> unique |> concatStringsSep ":"; - environment.shellAliases = { - ls = mkForce null; - l = mkForce null; - }; + # environment.shellAliases = { + # ls = mkForce null; + # l = mkForce null; + # }; }