From 038bfbf25ab4f444dd0c173e5f40270109f005c8 Mon Sep 17 00:00:00 2001 From: mat ess Date: Fri, 14 Apr 2023 02:40:01 -0400 Subject: [PATCH] Add nushell --- flake.lock | 19 ++++++++++++++++++- flake.nix | 2 ++ home/programs.nix | 6 +++--- pkgs/default.nix | 11 ++++++++++- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index ec45547..dd856e9 100644 --- a/flake.lock +++ b/flake.lock @@ -575,7 +575,8 @@ "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable", - "pre-commit": "pre-commit" + "pre-commit": "pre-commit", + "starship-src": "starship-src" } }, "rust-overlay": { @@ -599,6 +600,22 @@ "repo": "rust-overlay", "type": "github" } + }, + "starship-src": { + "flake": false, + "locked": { + "lastModified": 1681432161, + "narHash": "sha256-Jj5kiT+9R4w2lhmtkwEqsF34MOw63MM/SRCRA5FQ1PY=", + "owner": "starship", + "repo": "starship", + "rev": "ce7f984932a97b4ad3cd6e6ece8e1c3b6022ba99", + "type": "github" + }, + "original": { + "owner": "starship", + "repo": "starship", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 750c8b4..7d9a4ce 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,8 @@ kitty-themes.flake = false; fisher-src.url = "github:jorgebucaran/fisher"; fisher-src.flake = false; + starship-src.url = "github:starship/starship"; + starship-src.flake = false; }; outputs = diff --git a/home/programs.nix b/home/programs.nix index 8328423..309b2b3 100644 --- a/home/programs.nix +++ b/home/programs.nix @@ -18,7 +18,9 @@ }; nix-index = { enable = true; - enableFishIntegration = true; + }; + nushell = { + enable = true; }; ssh = { enable = true; @@ -27,14 +29,12 @@ AddKeysToAgent = "yes"; }; }; - # vscode vscode = { enable = true; # extensions = [ pijul-vscode ]; }; zoxide = { enable = true; - enableFishIntegration = true; }; }; # }}} diff --git a/pkgs/default.nix b/pkgs/default.nix index 7b834b6..9e6b29c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,13 +1,22 @@ { inputs }: _: prev: { inherit (inputs) kitty-icon kitty-themes; - helix = inputs.helix.packages.${prev.stdenv.system}.default; fishPlugins = prev.fishPlugins // { fisher = { name = "fisher"; src = inputs.fisher-src; }; }; + helix = inputs.helix.packages.${prev.stdenv.system}.default; + starship = prev.starship.overrideDerivation (drv: { + patches = (drv.patches or [ ]) ++ [ + (builtins.fetchurl { + name = "nushell.patch"; + url = "https://github.com/starship/starship/commit/041a51835371d3738cc7b597b4a506a5dc4341c9.diff"; + sha256 = "sha256:0az1jjb24mngzybgv7kavdj1bhfdm0cqnci3gz6zkgpaxqvw7vnz"; + }) + ]; + }); } // builtins.mapAttrs (name: extras: prev.callPackage