Last time I didn’t upgrade for a long while some drivers broke, maybe I’ll just switch to NixOS this time since it seems interesting. Does anyone here use NixOS? What do you think about it?

3 points

I guarantee it

permalink
report
reply
2 points

Hey look it’s my alt account

permalink
report
parent
reply

I use NixOS. Was a kinda rough start since it was annoying to install apps through a config, but after getting my config fully fledged out I love it. A declarative system is a dream for a dev, I can just copy my config to a new system, run one command, and I have my entire system back! Very stable as well

permalink
report
reply
9 points

I’ve gone like 5 moths without updating a laptop on Arch before and the only thing I had to deal with was updating keyring first

permalink
report
reply
1 point

That’s usually how it goes…sudo pacman -Sy archlinux-keyring and you’re good. Until you notice that all your python packages are broken because of 3.11 ;)

permalink
report
parent
reply
2 points

Same, maybe even longer in my case.

permalink
report
parent
reply
8 points

NixOS + Home Manager user here.

I run in an opt-in state config. / is tmpfs. /home is tmpfs. /boot and /nix are real filesystems. At boot, the EFI loader reads the configuration from /nix/persist/etc/nixos/flake.nix, symlinks all the programs and configs into / and /home, and startup proceeds as normal.

That means nothing persists across boots unless I add it to my config. Cruft doesn’t accumulate in hidden areas, it’s all in my config. That keeps things fast, makes management easier, and makes troubleshooting easier.

permalink
report
reply
4 points

The more I see about NixOS, the less I understand it.

Is it a pain in the ass to use on a daily basis? It just seems like one of those things where the juice isn’t worth the squeeze.

permalink
report
parent
reply
3 points

Daily use isn’t difficult IME. NixOS is just so nice once it’s working. It’s ridiculously easy to understand your system & how it’s set up (it’s all in your config). Nothing changes between updates that you don’t know about. You never have to merge configurations from upstream. It’s trivial to try something new without changing your system overall. Rollbacks are amazing. It’s easy to configure a new machine, to keep multiple machines synchronized (same packages & versions & even users & dotfiles). I have automatic updates enabled so I get a new system when I reboot, and if I don’t like an update I can just revert seamlessly. It basically works like an appliance: I don’t have to think about the way it’s set up unless I disagree with the defaults, and in that case I can change them. You can always override things, even down to applying patches to source code (though obviously that then requires re-compiling). It’s like if you took the stability of Debian, the up-to-date nature and huge repo of Arch & the AUR, and the configurability of Gentoo and mashed them all together.

The hard bits are packaging new programs and making “modules”. You can pretty much always configure a program by just writing the config file options in a Nix string block, e.g. I’ve got the following in my home-manager config for my ~/.xkbrc:

  home.file.".config/kxkbrc" = {
    text = ''
      [$Version]
      update_info=kxkb_variants.upd:split-variants

      [Layout]
      DisplayNames=
      LayoutList=us
      LayoutLoopCount=-1
      Model=pc86
      Options=terminate:ctrl_alt_bksp,compose:rctrl
      ResetOldOptions=true
      SwitchMode=Global
      Use=true
      VariantList=colemak
    '';
  };

Modules would let that be a Nix expression, e.g. looking like

programs.xkeyboard = {
  layout = "us";
  variant = "colemak";
  model = "pc86";
  options = {
    terminate = "ctrl_alt_bksp";
    compose = "rctrl";
  };
  resetOldOptions = true;
};

but that requires writing an expression in Nix that converts the Nix syntax into whatever syntax the config file needs to be. That means learning a lot more Nix. Packaging programs also requires learning more Nix, and particularly how Nixpkgs builders work.

That said, the documentation is shitty, the error messages are shitty, Flakes are massively easier to work with but still “experimental” and lots of the docs & examples online are for pre-flakes, while nixpkgs is enormous it doesn’t have everything, and IDE support for Nix shell environments is lacking (have to use VS Code or a terminal-based editor like nvim).

Nix is sort of like democracy. Democracy is the worst form of government, except for all the others. Nix is the worst way to manage an OS, except for all the others. It’s shitty, but it’s shitty in different ways and those mostly end up making day-to-day operations easier.

permalink
report
parent
reply
19 points
*

I’ve had no problems, as long as I’ve updated the keyring first sudo pacman-key —refresh-keys. I’ve probably gone a few times not upgrading my system for a while and I had minimal problems.

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 9.8K

    Monthly active users

  • 5.8K

    Posts

  • 162K

    Comments