Something like this might actually make it work again, but that’s more of a hack than the real solution.
environment.shellAlias = {
ls = "${pkgs.coreutils-full}/bin/ls --color=tty";
};
Something like this might actually make it work again, but that’s more of a hack than the real solution.
environment.shellAlias = {
ls = "${pkgs.coreutils-full}/bin/ls --color=tty";
};
My nixos is some weeks old, but my klibc does not have ls:
$ ll -d /nix/store/*-klibc-*
.r--r--r-- 2.8Ki root root 1 Jan 1970 /nix/store/8mwnmy7nxip47y4i7g9wvd1z6r9qc710-klibc-2.0.12.tar.xz.drv
.r--r--r-- 2.4Ki root root 1 Jan 1970 /nix/store/gkzbbv22b3biarx2g9pqmls0h5h46bwy-klibc-2.0.12.drv
dr-xr-xr-x - root root 1 Jan 1970 /nix/store/x4v7g388y5z25znb0x3xxf4fs2i21d7p-klibc-2.0.12
$ ll /nix/store/x4v7g388y5z25znb0x3xxf4fs2i21d7p-klibc-2.0.12/bin/
.r-xr-xr-x 10Ki root root 1 Jan 1970 klcc
well this gives ls back to my life indeed! Cool, thank you Nebucatnetzer! At least a hack for the mean time
And the good thing is that the other aliases work to now:
ll = “ls -lav --ignore=…”;
l = “ls -lav --ignore=.?*”;
/nix/store/5jzdsfwynrnhzqmdqilzf7j4hngnjsrk-klibc-2.0.12/bin/ls
Very interesting, this file is not supposed to exist… I’m not sure what could have gone wrong here.
Do you have this directory in your $PATH?
It defintiely seems to exist:
$ sudo nix store repair /nix/store/5jzdsfwynrnhzqmdqilzf7j4hngnjsrk-klibc-2.0.12
this path will be fetched (0.11 MiB download, 0.60 MiB unpacked):
/nix/store/5jzdsfwynrnhzqmdqilzf7j4hngnjsrk-klibc-2.0.12
$ ll /nix/store/5jzdsfwynrnhzqmdqilzf7j4hngnjsrk-klibc-2.0.12/bin/ls
Permissions Links Size User Group Date Modified Name
.r-xr-xr-x 2 8.7Ki root root 1970-01-01 01:00 /nix/store/5jzdsfwynrnhzqmdqilzf7j4hngnjsrk-klibc-2.0.12/bin/ls
I think I found out where it came from: it’s a top-level derivation called klibcShrunk
. I have not idea what it’s supposed to do, but I guess it’s related to the initrd environment.
$ echo $PATH
/run/wrappers/bin:/home/usr/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/usr/.nix-profile/bin:/etc/profiles/per-user/usr/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
Did you mean this? Then no …
Those are some of the last apps I’ve installed since the problem occurred:
wireplumber # session manager for PipeWire see "Sound"
# rofi-wayland # Window switcher, run dialog and dmenu replacement for Wayland
pavucontrol # PulseAudio Volume Control
swayidle # Idle management daemon for Wayland
klibcShrunk # Dependency for swayidle
wlogout # A wayland based logout menu
# swayloc # Screen locker for Waylandk
ydotool # CopyQ Dependency/for copy/paste commands
grim # CopyQ Dependency/for taking screenshots
slurp # CopyQ Dependency/for selecting area for screenshots
# wl-clipboard # Command-line copy/paste utilities for Wayland
tofi # Tiny dynamic menu for Wayland
and
programs.hyprland.enable = true;
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
};
Again, thank you all for the great help, I’m really happy to participate in such a lovely community!
Just remove klibcShrunk
from your package list.
Usually you do not need to add dependencies for something in the list.
Exactly, but where did you get the idea swayidle needs this thing?
As far as I understand, this package is a sort of busybox, but even more minimal for being used in an initrd.
I did do that! Now everything works!
Don’t know exactly why I did install klibcShrunk
. Maybe I read somewhere that it was needed after swayidle
didn’t work and forgot that I’m on awesome NixOS!
Anyway thank you very much for finding the solution! My life is now complete with ls and all!