• jim3692@discuss.online
    link
    fedilink
    arrow-up
    2
    ·
    10 hours ago

    NixOS has rm. But it’s not under /bin. There is no /bin in NixOS. The user’s programs are inside /run/current-system/sw/bin, and those are symlinks from files hidden in /nix/store.

    Running rm -rf / --no-preserve-root under NixOS, will not nuke the entire system, since /nix/store is mounted as read-only, and only remounted as rw when new applications are downloaded, or older unused ones are wiped.

      • jim3692@discuss.online
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        Maybe… I haven’t tried it to be honest. I will need to setup a VM for that, as my personal files would get wiped anyway.

        If you want to test it yourself, try to rm while nixos-rebuild is running.