I think the least that distros can do, is allow listing all packages and system settings in config files like .toml rather than having to type in every single package to install, or click through system setting GUIs to setup. Would that require using a whole programming language or system like NIx?

While NixOS works much differently from most distros, that’s the only reason I use it: package and system settings in text files. If I fix something, it’s fixed permanently, I don’t need to hunt down files in random directories if I want to change a setting. If I ever need to reinstall the OS I don’t have to write dnf install every single damn package and manually setup all that up all over again. Having daily-drove Windows macOS & Fedora as throughout the years, my setups have felt hacky as well as houses of cards as I’ve wanted or had to set them up again (I don’t mean Fedora specifically, but distros in general).

Basically it feels insane that it’s the way most linux users and servers in the world operate. If I, a humble computer hobbyist can figure out Nix, why don’t more users do so, and why is Nix so niche?

  • Crogdor@lemmy.ml
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    3 days ago

    Yeah and on Arch-based systems:

    Backup Packages

    Back up explicitly installed package list:

    pacman -Qqe > ~/packages.txt
    

    Back up explicitly installed foreign packages list (i.e. the AUR):

    pacman -Qqm > ~/foreign_packages.txt
    

    Backup the pacman config/mirrors:

    cp /etc/pacman.conf ~/pacman.conf.backup
    cp -r /etc/pacman.d/ ~/pacman.d.backup
    

    Restore Packages

    Restore the pacman config/mirrors:

    sudo cp ~/pacman.conf.backup /etc/pacman.conf
    sudo cp -r ~/pacman.d.backup/* /etc/pacman.d/
    

    Sync the system and update packages:

    sudo pacman -Syu
    

    Reinstall packages:

    sudo pacman -S --needed - < ~/packages.txt
    

    Reinstall foreign packages:

    yay -S --needed - < ~/foreign_packages.txt