this post was submitted on 28 Jul 2024
10 points (100.0% liked)

linuxmemes

31614 readers
632 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS
     
    top 17 comments
    sorted by: hot top controversial new old
    [–] pimeys@lemmy.nauk.io 3 points 2 years ago (1 children)

    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.

    [–] AI_toothbrush@lemmy.zip 1 points 2 years ago (1 children)

    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?

    [–] BCsven@lemmy.ca 1 points 2 years ago

    Can't you just do the package install via nix-env rather than the config file

    [–] QuizzaciousOtter@lemm.ee 1 points 2 years ago (1 children)

    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 1 points 2 years 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.

    [–] ColdWater@lemmy.ca 0 points 2 years ago (1 children)

    NixOS is cool, the whole Linux configuration in one file is convenient but I already found my home and comfort place that's Arch btw don't think I switch to other distro anytime soon

    [–] Laser@feddit.org 1 points 2 years ago

    Just to clarify, I wouldn't recommend putting everything in a single file, but rather modularize the configuration.

    I also came from Arch, but have since abandoned it, and I don't think I want to use distributions for myself that use the the classic imperative concept. One you get a better understanding of it, it makes so much more sense.

    [–] F04118F@feddit.nl 0 points 2 years ago (2 children)

    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

    [–] leisesprecher@feddit.org 1 points 2 years ago

    Yeah, you want to sniff nix first before you mainline nixos.

    [–] PlexSheep@infosec.pub 1 points 2 years ago

    How does that work? Let's say I'm on pop os developing a thing, how would I manage deps and dev envs with nix then? In a VM or what?

    I'm a Linux nerd, but I totally don't get nix. Tried to install some nix package manager on my Debian based distro and it was completely broken (the nix thing, not my os)

    [–] vga@sopuli.xyz -1 points 2 years ago* (last edited 2 years 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.

    [–] Blue_Morpho@lemmy.world -1 points 2 years ago (5 children)

    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.

    [–] Wooki@lemmy.world 1 points 2 years ago

    it wanted me to setup my own partitions manually

    You've obviously never used nix, it's GUI installer can auto configure just fine.

    When your OS AND apps are declared and stateful a lot of risk and complexity is removed. Configuring is just a bad experience with poor usability and worse documentation.

    [–] Chef6652@lemmy.world 1 points 2 years ago

    There is a Gnome/KDE installer too now ;)

    [–] Laser@feddit.org 1 points 2 years 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

    [–] turnipjs@lemmy.ml 1 points 2 years ago

    How long ago did you try? You should try again, I did not have this experience setting up with the graphical installer a few weeks ago.

    [–] suction@lemmy.world 0 points 2 years ago

    Where do you draw the line though between tool and lifestyle? At setting up partitions (which is a trivial thing I would not mind at all)?