Error after logging in with fish shell
onny opened this issue · 1 comments
onny commented
Hey, after logging in with root
to the nixos-shell
vm, I get following error:
<<< Welcome to NixOS 21.11.git.3d6b1e6372eM (x86_64) - ttyS0 >>>
Log in as "root" with an empty password.
If you are connect via serial console:
Type Ctrl-a c to switch to the qemu console
and `quit` to stop the VM.
Run 'nixos-help' for the NixOS manual.
nixos login: root
set: Tried to change the read-only variable “PWD”
test: Missing argument at index 6
-z -a -eq 1
^
~/.config/fish/config.fish (line 23):
if test -z "$DISPLAY" -a $XDG_VTNR -eq 1
^
from sourcing file ~/.config/fish/config.fish
called during startup
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
The source file which is loaded looks like this:
# ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated
# automatically by home-manager.
# if we haven't sourced the general config, do it
if not set -q __fish_general_config_sourced
set --prepend fish_function_path /nix/store/xyy67np060dn02kv1k84r3rxv1xb9h4f-fishplugin-foreign-env-git-20200209/share/fish/vendor_functions.d
fenv source /home/onny/.nix-profile/etc/profile.d/hm-session-vars.sh > /dev/null
set -e fish_function_path[1]
# and leave a note so we don't source this config section again from
# this very shell (children will source the general config anew)
set -g __fish_general_config_sourced 1
end
# if we haven't sourced the login config, do it
status --is-login; and not set -q __fish_login_config_sourced
and begin
# Login shell initialisation
if test -z "$DISPLAY" -a $XDG_VTNR -eq 1
exec /nix/store/ps113w91dgz263nx39561jyq2xfmclcb-dbus-1.12.20/bin/dbus-run-session /nix/store/lncrylx32a8m8sja6h5gjvs0fh6ag05p-sway-1.6.1/bin/sway
end
# and leave a note so we don't source this config section again from
# this very shell (children will source the general config anew)
set -g __fish_login_config_sourced 1
end
# if we haven't sourced the interactive config, do it
status --is-interactive; and not set -q __fish_interactive_config_sourced
and begin
# Abbreviations
# Aliases
# Prompt initialisation
# Interactive shell intialisation
# add completions generated by Home Manager to $fish_complete_path
begin
set -l joined (string join " " $fish_complete_path)
set -l prev_joined (string replace --regex "[^\s]*generated_completions.*" "" $joined)
set -l post_joined (string replace $prev_joined "" $joined)
set -l prev (string split " " (string trim $prev_joined))
set -l post (string split " " (string trim $post_joined))
set fish_complete_path $prev "/home/onny/.local/share/fish/home-manager_generated_completions" $post
end
alias codium='codium --enable-features=UseOzonePlatform·--ozone-platform=wayland'
alias signal-desktop='signal-desktop --enable-features=UseOzonePlatform·--ozone-platform=wayland'
# and leave a note so we don't source this config section again from
# this very shell (children will source the general config anew,
# allowing configuration changes in, e.g, aliases, to propagate)
set -g __fish_interactive_config_sourced 1
end
I don't get this error when using fish
on my host system :(
Best regard
Jonas
Mic92 commented
We don't add a lot in the interactive login:
nixos-shell/share/nixos-shell/nixos-shell.nix
Line 162 in f006b39
Do we need to filter out fish here?