You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran a nix flake update, followed by a nix run ./#build-switch - and I now seem to be getting an NixOS error regarding the shell configuration?
❯ nix run ./#build-switch
warning: Git tree '/Users/foobar/nixos-config' is dirty
Running build-switch for aarch64-darwin
Starting build...
warning: Git tree '/Users/foobar/nixos-config' is dirty
error:
… while evaluating the attribute 'value'
at /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/lib/modules.nix:816:9:
815| in warnDeprecation opt //
816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
817| inherit (res.defsFinal') highestPrio;
… while calling the 'addErrorContext' builtin
at /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/lib/modules.nix:816:17:
815| in warnDeprecation opt //
816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
817| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error:
Failed assertions:
- users.users.foobar.shell is set to fish, but
programs.fish.enable is not true. This will cause the fish
shell to lack the basic Nix directories in its PATH and might make
logging in as that user impossible. You can fix it with:
programs.fish.enable = true;
If you know what you're doing and you are fine with the behavior,
set users.users.foobar.ignoreShellProgramCheck = true;
instead.
I do have the following in modules/shared/home-manager.nix:
40 fish = {
41 enable = true;
42 # loginShellInit = ''
43 # if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish ]]; then
44 # source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
45 # source /nix/var/nix/profiles/default/etc/profile.d/nix.fish
46 # fi
47 # '';
48 };
However, it seems like NixOS itself might not be aware of the home-manager module?
I'm pretty confused here as to the best way to fix this - is there some other place I should be setting fish.enable = true, on top of within home-manager.nix?
The text was updated successfully, but these errors were encountered:
I just set this repo up today on a new Mac and was hoping to get Fish, my preferred shell, working.
Unfortunately, I've been unable to do so with this repo. My existing (private) nix-config repo has Fish working just fine, so I couldn't say why it's not working in this one. I've tried just about every combination of config I can, and zsh always shows up.
FWIW, you can make this error go away by adding: programs.fish.enable = true;
to modules/darwin/home-manager.nix
Despite the error going away, the shell remains zsh.
I recently ran a
nix flake update
, followed by anix run ./#build-switch
- and I now seem to be getting an NixOS error regarding the shell configuration?I do have the following in
modules/shared/home-manager.nix
:However, it seems like NixOS itself might not be aware of the home-manager module?
NixOS/nixpkgs#280726
I'm pretty confused here as to the best way to fix this - is there some other place I should be setting
fish.enable = true
, on top of within home-manager.nix?The text was updated successfully, but these errors were encountered: