From 30765ff3c4b3c3137b8412201c776e5ac9aa36c1 Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Sat, 29 Mar 2025 21:42:27 +1100 Subject: [PATCH] Add nix-your-shell so I can use fish in nix shells --- nixos/configuration.nix | 13 ++++++++++++- nixos/flake.nix | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 99c4df2..7b11ade 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -7,6 +7,7 @@ pkgs, unstable, inputs, + nix-your-shell, ... }: @@ -15,6 +16,10 @@ # in { + nixpkgs.overlays = [ + nix-your-shell.overlays.default + ]; + nix.settings.experimental-features = [ "nix-command" "flakes" @@ -143,7 +148,13 @@ programs.firefox.enable = true; programs.thunderbird.enable = true; - programs.fish.enable = true; + programs.fish = { + enable = true; + interactiveShellInit = '' + nix-your-shell fish | source + ''; + }; + programs.gpu-screen-recorder = { enable = true; diff --git a/nixos/flake.nix b/nixos/flake.nix index e21ffc5..e210adc 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -10,12 +10,19 @@ # CPU microcode updater ucodenix.url = "github:e-tho/ucodenix"; + + nix-your-shell = { + url = "github:MercuryTechnologies/nix-your-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = { nixpkgs, unstable, + nix-your-shell, ... }@inputs: let @@ -35,6 +42,8 @@ inherit system; config.allowUnfree = true; }; + + inherit nix-your-shell; }; modules = [ ./configuration.nix