summaryrefslogtreecommitdiff
path: root/users/seth/shell
diff options
context:
space:
mode:
authorseth <[email protected]>2024-01-25 04:15:43 -0500
committerseth <[email protected]>2024-01-25 04:15:43 -0500
commit923af807e5f9e1bc1cc170c519a05be371b8ae84 (patch)
treebe0ec762de6acf151e283ce69547e1fbfbb1cb4b /users/seth/shell
parentbc5ae75eb21567edae47fcaae4921b0671300f80 (diff)
seth/shell: init nu config
Diffstat (limited to 'users/seth/shell')
-rw-r--r--users/seth/shell/bash.nix1
-rw-r--r--users/seth/shell/nu.nix36
2 files changed, 37 insertions, 0 deletions
diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix
index f9a1afa..46c03d4 100644
--- a/users/seth/shell/bash.nix
+++ b/users/seth/shell/bash.nix
@@ -1,6 +1,7 @@
{config, ...}: {
programs.bash = {
enable = true;
+ # TODO: find out if i need this anymore with standalone HM
bashrcExtra = ''
nixfile=${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.sh
[ -e "$nixfile" ] && source "$nixfile"
diff --git a/users/seth/shell/nu.nix b/users/seth/shell/nu.nix
new file mode 100644
index 0000000..1437a97
--- /dev/null
+++ b/users/seth/shell/nu.nix
@@ -0,0 +1,36 @@
+{
+ config,
+ lib,
+ inputs,
+ ...
+}: let
+ theme = "catppuccin-${config.catppuccin.flavour}";
+in {
+ programs = {
+ nushell = {
+ enable = true;
+
+ configFile.text = ''
+ def "nixgc" [] {
+ sudo nix-collect-garbage -d; nix-collect-garbage -d
+ }
+ '';
+
+ envFile.text = ''
+ use ${inputs.nu-scripts}/themes/nu-themes/${theme}.nu
+ $env.config.color_config = (${theme})
+ '';
+
+ inherit (config.home) shellAliases;
+ };
+
+ bash.initExtra = lib.mkAfter ''
+ if [[ $(ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]; then
+ exec ${lib.getExe config.programs.nushell.package}
+ fi
+ '';
+
+ # builtin `ls` is good here!
+ eza.enable = lib.mkForce false;
+ };
+}