Open jab opened 2 years ago
If the steps I took (above) for setting up nix-darwin-provided fish as my shell were correct, want me to contribute them somewhere that would be more discoverable to fish users than here? If they weren't correct, if I find out what the correct steps are I could write those down somewhere better instead.
I'm a very new nix user myself, but this is what I think is supposed to be the "nix" way:
pkgs.fish
to https://daiderd.com/nix-darwin/manual/index.html#opt-environment.shells should add /run/current-system/sw/bin/fish
to /etc/shells
pkgs.fish
This got me a working fish with all the nix- and darwin- commands. Hope it helps
@ dingyuchen I added the line
environment.shells = [ pkgs.bashInteractive pkgs.zsh pkgs.fish ];
to my configuration.nix
Then ran ` nix build .#darwinConfigurations.utm-vm.system --extra-experimental-features nix-command --extra-experimental-features flakes
./result/sw/bin/darwin-rebuild switch --flake . `
I got the shells added to /etc/shells by programs.fish.enable etc.
What exactly do you have to do? (environment.systemPackages is loading things so some of my config works)
I recently installed nix-darwin for the first time. The installer mentioned that it was modifying config for bash and zsh to interoperate with nix, but it didn't say anything about fish, so I'm not sure to what extent fish is supported, and what steps I need to take to use nix-darwin-provided fish as my default shell.
I tried adding
pkgs.fish
toenvironment.systemPackages
and settingprograms.fish.enable = true
in mydarwin-configuration.nix
, then runningdarwin-rebuild switch && echo /run/current-system/sw/bin/fish > /etc/shells && chsh -s /run/current-system/sw/bin/fish
, and finally opening a new terminal window, and immediately hit #122, so fish was unusable out-of-the-box. Once I added this workaround I got it working.Thanks for maintaining nix-darwin!