diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index 474339a..80a08c2 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -44,7 +44,7 @@ "scanner" "docker" ]; - shell = pkgs.nushell; + shell = pkgs.zsh; home = "/home/thegeneralist"; homeMode = "0750"; hashedPasswordFile = config.age.secrets.password.path; @@ -98,7 +98,6 @@ group = "users"; tokenFile = config.age.secrets.readlaterBotToken.path; settings = { - media_dir = "/home/thegeneralist/obsidian/09 Misc/Assets/images_misc"; resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources"; read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md"; finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md"; diff --git a/modules/common/packages.nix b/modules/common/packages.nix index eedaada..5abdf00 100644 --- a/modules/common/packages.nix +++ b/modules/common/packages.nix @@ -39,8 +39,6 @@ in { vivid ripgrep yazi - lazygit - yaziPlugins.lazygit jq yq-go eza @@ -49,12 +47,8 @@ in { fastfetch carapace bat - - mosh ]) ++ optionals (pkgs ? bat-extras && pkgs.bat-extras ? core) [ pkgs.bat-extras.core ]; - - environment.shellAliases.mosh = "mosh --no-init"; } diff --git a/modules/common/ripgrep.nix b/modules/common/ripgrep.nix index 249a1fa..15137c7 100644 --- a/modules/common/ripgrep.nix +++ b/modules/common/ripgrep.nix @@ -2,8 +2,6 @@ environment.shellAliases = { todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; todos = /* sh */ "nvim ~/todo.md"; - bgr = /* sh */ "batgrep"; - brg = /* sh */ "batgrep"; }; home-manager.sharedModules = [{ diff --git a/modules/common/shell/0_nushell.nix b/modules/common/shell/0_nushell.nix index 9810890..ffa8f6f 100644 --- a/modules/common/shell/0_nushell.nix +++ b/modules/common/shell/0_nushell.nix @@ -1,70 +1,35 @@ -{ - 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 // { ls = "ls"; }; + shellAliases = config.environment.shellAliases + |> filterAttrs (_: value: value != null); - 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 461c2d5..b06e7f2 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 unique; + inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce 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; + }; }