• pimeys@lemmy.nauk.io
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    Yes. And I feel sad because I haven’t been excited on any other OS for years after learning NixOS. I used to be excited about playing with things like FreeBSD, but now they all feel like something’s missing…

    Not for everybody, but as a software engineer nix/nixos is blessing.

    • AItoothbrush@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Its especially annoying for me because i wanna go back to something that “just works” but i miss the nix features. I like declaring my system but managing packages declaratively is just such a pain. I just wanna do apt-get install package its just easier i dont want to rebuild my whole ass system. Something i found that may work is using nix for the system and then distrobox for packages. Yall think thats something that would work well?

  • GustavoM@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I tried it once and gave up after realizing the necessary mental gymnastics to do simple things like installing something.

  • TheWordBotcher@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    As someone who has never tried Linux, this meme has done more to make me want to give it a try than anything else Linux users have thrown at me so far. The fox is very convincing. I might step into the back of an unmarked van if it asked me to.

  • Blue_Morpho@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    I’d been hearing a lot about NixOS so I did a VM install. It wanted me to setup my own partitions manually without even giving preset sane defaults like I was back in 1994 installing Slackware.

    Nope. My OS is a tool, not a lifestyle.

    • Laser@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      This is the opposite of me. I always get nervous when I don’t have precise control over how the disk layout looks. I explicitly decided for the non-graphical installer when I first downloaded NixOS

  • vga@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 months ago

    I actually got NixOS after the latest time I tried it. But I also got that I don’t want it, Arch is much simpler in all the good ways.

    And perhaps something like https://github.com/kiviktnm/decman can some day give us part of Nix’s power without going all-in with the functional declarative thingamadoodle.

    • archer@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Wow thanks I was wondering for a while if something like this existed! I’m very happy with regular Arch, but I am very curious to try both an immutable/atomic and a declarative distro. At least the second I guess I can kina replicate now with this. Another rabbit hole to go down I think. :D

  • F04118F@feddit.nl
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Don’t listen to him! Just start using Nix to manage dependencies and dev environments for your projects but keep your OS the same until you are really good at Nix

  • QuizzaciousOtter@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    I mean, it’s like a fucking drug. The learning curve is steep AF but past some point, when it starts making sense, it’s just incredible. I’m currently moving my whole setup to NixOS and I’m in love.

    • Laser@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      Even when using in a basic way, I think it has one very tangible advantage: the fact that you can “compartmentalize” different aspects of your configuration.

      Let’s say I set up a specific web service that I want to put behind a reverse proxy, and it uses a specific folder that doesn’t exist yet, like Navidrome which is a web-based audio player. It requires a set of adjustments of different system parts. My nix file for it looks like this:

      { config, ... }:
      
      let
        domain = "music." + toString config.networking.domain;
      in
        {
          services.navidrome = {
            enable = true;
            settings = {
              Address = "127.0.0.1";
              Port = 4533;
              MusicFolder = "/srv/music";
              BaseUrl = "https://" + domain;
              EnableSharing = true;
              Prometheus.Enabled = true;
              LogLevel = "debug";
              ReverseProxyWhitelist = "127.0.0.1/32";
            };
          };
      
          services.nginx = {
            upstreams = {
              navidrome = {
                servers = {
                  "127.0.0.1:${toString config.services.navidrome.settings.Port}" = {};
                };
              };
            };
          };
      
          services.nginx.virtualHosts."${domain}" = {
            onlySSL = true;
            useACMEHost = config.networking.domain;
            extraConfig = ''
              include ${./authelia/server.conf};
            '';
            locations."/" = {
              proxyPass = "http://navidrome";
              recommendedProxySettings = false;
              extraConfig = ''
                include ${./authelia/proxy.conf};
                include ${./authelia/location.conf};
              '';
            };
          };
      
          systemd.tmpfiles.settings."navidrome-music-dir"."${toString config.services.navidrome.settings.MusicFolder}" = {
            d = {
              user = "laser";
              mode = "0755";
            };
          };
          systemd.services.navidrome.serviceConfig.BindReadOnlyPaths = ["/run/systemd/resolve/stub-resolv.conf"];
            
          security.acme.certs."${config.networking.domain}".extraDomainNames = [ "${domain}" ];
        }
      

      All settings related to the service are contained in a single file. Don’t want it anymore? Comment it out from my main configuration (or whereever it’s imported from) and most traces of it are gone, the exception being the folder that was created using systemd.tmpfiles. No manually deleting the link from sites-available or editing the list of domains for my certificate. The next generation will look like the service never existed.

      And in my configuration, at least the port could be changed and everything would still work – I guess there is room for improvement, but this does what I want pretty well.

      • sunstoned@lemmus.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 months ago

        Love the example here!

        I’m still learning about available references (ex config.services.navidrome.settings.Port). What resources did you find to be the best for learning that kind of thing?

        I’ll accept RTFM if that’s applicable :)

        • Laser@feddit.org
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago

          Well, a lot of it is just trying stuff out, but let’s say you want to setup Navidrome because you read about it somewhere. My first step is always to go to https://search.nixos.org/options? and search for it, it’ll show you the options available. If you want to know how it’s implemented under the hood, press the “Declared in” link where it shows you the source code of the module, this can sometimes be helpful.

          Other than that, read the wiki for examples, and remember that nix is a full language and not just a configuration, so you can keep it flexible.