4 ms·
I can't tell you the number of times I see a project and think to myself "NixOS already solves that problem but better."
by choward 2y ago
I can't tell you the number of times I see a project and think to myself "NixOS already solves that problem but better."
- fallingsquirrel 2y agoIn fairness, this app supports snapshotting your home directory as well, and that's not solvable with Nix alone. In fact, I'm running NixOS and I've been meaning to set up Timeshift or Snapper for my homedir, but alas, I haven't found the time.
- __MatrixMan__ 2y agoIs there something about your home directory that you'd want to back up that is not covered by invoking home manager as a nix module as part if nixos-rebuild? https://nix-community.github.io/home-manager/index.xhtml#sec-install-nixos-module https://nix-community.github.io/home-manager/index.xhtml#sec... To me, it's better than a filesystem-backup because the things that make it into home manager tend to be exactly the things that I want to back up. The rest of it (e.g. screenshots, downloads) aren't something I'd want in a backup scheme anyhow.
- fallingsquirrel 2y agoI want to keep snapshots of my work. I run nightly backups which have come in handy numerous times, but accessing the cloud storage is always slow, and sometimes I've even paid a few cents in bandwidth to download my own files. It would be a lot smoother if everything was local and I could grep through /.snapshots/<date>/<project>.
- deleted 2y ago[deleted]
- SAI_Peregrinus 2y agoData (documents, pictures, source code, etc.) is not handled by home-manager. Backing up home.nix saves your config, but the data is just as if not more important.
- __MatrixMan__ 2y agoHmm, different strokes I guess. Maybe it's just that too much kubernetes has gone to my head, but I see files as ephemeral. Code and docs are in source control. My phone syncs images to PCloud when I take them. Anything I download is backed up... wherever I downloaded it from.
- SAI_Peregrinus 2y agoCloud sync != backup. Cloud sync won't help if you accidentally delete the file, backups will. Cloud sync won't help if you make an undesired edit, backups will.
- __MatrixMan__ 2y agoBut I can just rebuild the file, or restore it from a previous commit (or if I'm having a particularly bad day, restore its inputs from a previous commit and _then_ rebuild it).
- autoexecbat 2y agoI've seen the configuration.nix file, it doesn't look like it captures specific versions. How does it handle snapshotting?
- somnic 2y agoFor managing your configuration.nix file itself you can just use whichever VCS you want, it's a text file that describes one system configuration and managing multiple versions and snapshots within that configuration file is out of scope. For the system itself, each time you run "nixos-rebuild switch" it builds a system out of your configuration.nix, including an activation script which sets environment variables and symlinks and stops and starts services and so on, adds this new system to the grub menu, and runs the activation script. It specifically doesn't delete any of your old stuff from the nix store or grub menu, including all your older versions of packages, and your old activation scripts. So if your new system is borked you can just boot into a previous one.
- alfalfasprout 2y agoThe problem, unfortunately, is that Nix often finds itself in a chicken and egg scenario where nixpkgs fails to provide a lot of important packages or has versions that are old(er). But for there to be more investment in adding more packages, etc. you need more people using the ecosystem.
- atlintots 2y agoLuckily Nix is also an excellent build system, and does provide escape hatches here and there when you really need them (e.g nix-ld).
- NoThisIsMe 2y agoWhat are you talking about? Nixpkgs is one of the largest and most up-to-date distro package repos out there.
- airtonix 2y ago[dead]
- arianvanp 2y agoNixpkgs is the largest and most up to date package repository according to https://repology.org/ https://repology.org/ I'm honestly curious what packages you have a problem with
- SAI_Peregrinus 2y agoProprietary package vendors often provide a. deb that assumes Ubuntu. Maybe also a. rpm for RedHat if you're lucky.
- tombert 2y agoThat's definitely true, but maybe I've just been lucky, pretty much every proprietary program I've wanted to install in NixOS has been in Nixpkgs. Skype, Steam, and Lightworks are all directly available in the repos and seem to work fine as far as I can tell. I'm sure there are proprietary packages that don't work or aren't in the repo, but I haven't really encountered them.
- pmarreck 2y agoImagine installing an entirely new window manager without issue, and then undoing it without issue. NixOS does that. And I'm pretty sure that no other flavor of Linux does. First time I realized I could just blithely "shop around window managers" simply by changing a couple of configuration lines, I was absolutely floored. NixOS is the first Linux distro that made me actually feel like I was free to enjoy and tinker with ALL of Linux at virtually no risk. There is nothing else like it. (Except Guix. But I digress.)
- tombert 2y agoCompletely agree; being able to transparently know what the system is going to do by just looking at a few lines of text is sort of game-changing. It's trivial to add and remove services, and you can be assured that you actually added and removed them, instead of just being "pretty sure" about it. Obviously this is just opinion (no need for someone to supply nuance) but from my perspective the NixOS model is so obviously the "correct" way of doing an OS that it really annoys me that it's not the standard for every operating system. Nix itself is an annoying configuration language, and there are some more arcane parts of config that could be smoothed over, but the model is so obviously great that I'm willing to put up with it. If nothing else, being able to trivially "temporarily" install a program with nix-shell is a game-changer to me; it changes the entire way of how I think about how to use a computer and I love it. Flakes mostly solve my biggest complaint with NixOS, which was that it was kind of hard to add programs that weren't merged directly into the core nixpkgs repo.
- pmarreck 2y ago> but from my perspective the NixOS model is so obviously the "correct" way of doing an OS that it really annoys me that it's not the standard for every operating system - Literally every person who's read the Nix paper and drank the kool-aid thinks this lol. I STILL don't completely understand every element of my nix config but it's still quite usable. Adding software requires adding it to the large-ish config file, largely because I created overlay namespaces of "master.programname", "unstable.programname" and "stable.programname" (with the default being "unstable" in my case) but those would all ideally be moved out into 2 text files, 1 for system level (maybe called system_packages.txt) and one for a named user (perhaps called <username>_packages.txt) and if those could be imported somehow into the configuration.nix, I think that would make things a bit easier for end-users, at least initially. The commandline UI (even the newer `nix` one) could still use an overhaul IMHO. The original CL utils were CLEARLY aimed directly at Nix developers, and not so much at end-users... I've been working on my own wrapper to encapsulate the most common use-cases I need the underlying TUI for https://github.com/pmarreck/ixnay https://github.com/pmarreck/ixnay < and that's it so far.