27 votes

From Zero to Nix

8 comments

  1. Alanh02
    Link
    I had been reading about Docker and Nix in some posts here on Tildes, and I chatted with one of my team who has been playing with and evangilising nix in our development environment. He gave me...

    I had been reading about Docker and Nix in some posts here on Tildes, and I chatted with one of my team who has been playing with and evangilising nix in our development environment. He gave me the link above and I have found it useful.
    I hope you will also

    6 votes
  2. [2]
    drannex
    Link
    This is perfect timing, I just switched to NixOS this week as a daily driver. So far, the generational builds have already drastically changed the game for me (time travel? best super power) already.

    This is perfect timing, I just switched to NixOS this week as a daily driver. So far, the generational builds have already drastically changed the game for me (time travel? best super power) already.

    4 votes
    1. codesplice
      Link Parent
      I've also been switching to Nix/NixOS this week. It's one of those things I've known of for a while but I'm very glad to have finally taken the dive.

      I've also been switching to Nix/NixOS this week. It's one of those things I've known of for a while but I'm very glad to have finally taken the dive.

      3 votes
  3. [2]
    mantrid
    (edited )
    Link
    The Determinate Nix installer is failing for me on WSL Ubuntu 22.04. It says "Could not detect systemd," but I'm pretty sure it's installed and running on my system: $ systemd --version systemd...

    The Determinate Nix installer is failing for me on WSL Ubuntu 22.04. It says "Could not detect systemd," but I'm pretty sure it's installed and running on my system:

    $ systemd --version
    systemd 249 (249.11-0ubuntu3.9)
    +PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
    

    Does anyone know how to get it to work?
    I've figured it out. You need to edit /etc/wsl.conf and add the following two lines:

    [boot]
    systemd=true
    

    Then close the terminal, open up PowerShell, and enter wsl.exe --shutdown to force WSL to reboot. Finally, you can confirm that systemd is running with ps -p 1 -o comm= or by entering a command like systemctl list-unit-files --type=service that relies on systemd.

    4 votes
    1. codesplice
      Link Parent
      WSL adding (manually-enabled) support for systemd has been a real game changer for me. I've been using that for running Docker directly in WSL without needing Docker Desktop. Looks like I'll have...

      WSL adding (manually-enabled) support for systemd has been a real game changer for me. I've been using that for running Docker directly in WSL without needing Docker Desktop.

      Looks like I'll have to get Nix going there now too. Thanks for persevering and sharing what was needed.

      2 votes
  4. userexec
    Link
    I just learned about Nix reading Tildes today and wasn't really grasping why I would use it when my small team already deploys projects with Docker. This article really helped to clear that up for...

    I just learned about Nix reading Tildes today and wasn't really grasping why I would use it when my small team already deploys projects with Docker. This article really helped to clear that up for me.

    I'm not sure I'll end up learning it since it solves a problem we've never really had. Our stuff isn't too pinned to specific versions of anything under it and has few dependencies to begin with. I can definitely see the benefit, though, and I may start using it anyway just to have what appears to be a pretty painless way of running multiple versions of non-work stuff on my machine without having to worry about crap colliding.

    2 votes
  5. iout
    Link
    I really like the concept of Nix but unfortunately my experience using it wasn't the best. I've installed the Nix package manager in my Debian 11 and used it to install libreoffice. I've found...

    I really like the concept of Nix but unfortunately my experience using it wasn't the best.

    I've installed the Nix package manager in my Debian 11 and used it to install libreoffice. I've found that many of the icons and visual elements seemed off. I'm using a HiDPI display so I know I should've tried to configure libreoffice to fit the display properties, but at the time I didn't bother.

    I've also tried to install kodi, which is a problematic package even if installed from the Debian official repos due to some of the libraries it needs to function properly, and again it was a bit glitchy.

    I've had more success with flatpak (which I've used to install kodi and it works fairly well) so I'm sticking with it for now. I must admit that I haven't looked properly into nix and its functional language, which seems to be great in principle, but I don't feel motivated to dive into it yet.

    I've also read that graphics drivers cannot be properly packaged using the purely functional approach of Nix.

    2 votes
  6. devilized
    Link
    This looks like it could be quite useful in my team's quite diverse development environment. Thanks for sharing!

    This looks like it could be quite useful in my team's quite diverse development environment. Thanks for sharing!

    1 vote