Live data from Hacker News

My experience with NixOS

blog.patchgirl.io

51–60 of 95 posts

Re: My experience with NixOS

#51
post #47
post #43

Earlier quoted context omitted.

One common beginner mistake is attempting to modify files in the immutable store directly. Don't do that. The system is read only for a reason. Also make sure you allocate enough space on your root partition so you don't have to run garbage collection all the time.

I made the switch from Arch about a week ago. So far, great experience. I love the fact that my system state is reproducible and if I use version control on my dotfiles, I basically have a full backup of the look and feel of my workstation. VFIO with GPU passthrough works flawlessly. Setting up FDE with LUKS during and after the install was a breeze as well. Really enjoyed the whole experience. Being able to switch b…

I have something like this in my overlays.nix:

  self: super:
  
  let
    callPackage = super.callPackage;
  in {
    darktable = callPackage
      ./pkgs/darktable { inherit (super) darktable; };
  }
And my default.nix in pkgs/darktabele looks like this:

  { darktable, fetchurl, ... }:
  
  darktable.overrideAttrs (_: rec {
    version = "3.0.0";
    src = fetchurl {
      url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
      sha256 = "7195a5ff7ee95ab7c5a57e4e84f8c90cc4728b2c917359203c21293ab754c0db";
    };
  })

Re: My experience with NixOS

#52
post #47
post #43

Earlier quoted context omitted.

One common beginner mistake is attempting to modify files in the immutable store directly. Don't do that. The system is read only for a reason. Also make sure you allocate enough space on your root partition so you don't have to run garbage collection all the time.

I made the switch from Arch about a week ago. So far, great experience. I love the fact that my system state is reproducible and if I use version control on my dotfiles, I basically have a full backup of the look and feel of my workstation. VFIO with GPU passthrough works flawlessly. Setting up FDE with LUKS during and after the install was a breeze as well. Really enjoyed the whole experience. Being able to switch b…

How well does Gnome work with NixOS? Ideally newer versions...

Re: My experience with NixOS

#53
post #51
post #47

Earlier quoted context omitted.

I made the switch from Arch about a week ago. So far, great experience. I love the fact that my system state is reproducible and if I use version control on my dotfiles, I basically have a full backup of the look and feel of my workstation. VFIO with GPU passthrough works flawlessly. Setting up FDE with LUKS during and after the install was a breeze as well. Really enjoyed the whole experience. Being able to switch b…

I have something like this in my overlays.nix: self: super: let callPackage = super.callPackage; in { darktable = callPackage ./pkgs/darktable { inherit (super) darktable; }; } And my default.nix in pkgs/darktabele looks like this: { darktable, fetchurl, ... }: darktable.overrideAttrs (_: rec { version = "3.0.0"; src = fetchurl { url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/d…

Thank you. I was able to move forward similarly as well. Good to see the solution I arrived at isn't too far from yours.

  self: super:
  {
    electrum = super.electrum.overrideAttrs(old: rec {
      preBuild = old.preBuild + ''
        # Patch unnecessarily tight dependency on ecdsa version
        substituteInPlace ./contrib/requirements/requirements.txt --replace 'ecdsa>=0.14' 'ecdsa>=0.13'
  
      additionalInputs = with super.python37Packages; [
        python-jsonrpc-server
      ];
  
      propagatedBuildInputs = old.propagatedBuildInputs ++ additionalInputs;
  
      src = super.fetchFromGitHub {
        owner = "spesmilo";
        repo = "electrum";
        rev = "223b62554ead397bb94013c0d9c95b63a0708ea6";
        sha256 = "05djndhdggsw0r9pqn3gnb31nvzghgcsg05r3f7b6hwz84zbl22r";
        fetchSubmodules = true;
      };
    });
  }

Re: My experience with NixOS

#54
post #52
post #47

Earlier quoted context omitted.

I made the switch from Arch about a week ago. So far, great experience. I love the fact that my system state is reproducible and if I use version control on my dotfiles, I basically have a full backup of the look and feel of my workstation. VFIO with GPU passthrough works flawlessly. Setting up FDE with LUKS during and after the install was a breeze as well. Really enjoyed the whole experience. Being able to switch b…

How well does Gnome work with NixOS? Ideally newer versions...

I have had no issues. Managing and maintaining preferences and defaults of GNOME actually feels easier on NixOS.

Re: My experience with NixOS

#55
post #7

I'm yet to see a backend app architecture that both is elegant and effective from developer perspective and at the same time doesn't push her to make unneccessary database calls for each request when business logic becomes significantly complex.

> doesn't push her to make unneccessary database calls for each request when business logic becomes significantly complex. Are you objecting to holding all state in a database, or something else? If so, the only real alternative is to have individual servers hold state, which seems like a poor choice; one way or another you're going to hit the CAP theorem, and databases are well-optimized for getting you the best res…

Absolutely not. On the contrary, I'm one of those developers who prefer to do things in SQL rather than application logic.

Re: My experience with NixOS

#56
post #47
post #43

Earlier quoted context omitted.

One common beginner mistake is attempting to modify files in the immutable store directly. Don't do that. The system is read only for a reason. Also make sure you allocate enough space on your root partition so you don't have to run garbage collection all the time.

I made the switch from Arch about a week ago. So far, great experience. I love the fact that my system state is reproducible and if I use version control on my dotfiles, I basically have a full backup of the look and feel of my workstation. VFIO with GPU passthrough works flawlessly. Setting up FDE with LUKS during and after the install was a breeze as well. Really enjoyed the whole experience. Being able to switch b…

What you are trying to do doesn't look like an overlay, but an override[1].

you can do something like this:

    let
      new_electrum = pkgs.electrum.overrideAttrs (oldAttrs: rec {
        name = "${oldAttrs.pname}-${version}";
        version = "4.0.0a";
        src = fetchurl {
          url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
          sha256=pkgs.lib.fakeSha256;
        };
      })
    in
      
Unfortunately there is no https://download.electrum.org/4.0.0a/Electrum-4.0.0a.tar.gz so I don't have the hash. So you would need to perhaps correct it. You could invoke this it will fail with an error that hash is wrong and will provide the file hash, then just replace pkgs.lib.fakeSha256 with the hash in quotes.

[1] https://nixos.org/nixpkgs/manual/#sec-pkg-overrideAttrs

Edit: looks like the version is on GitHub, and after I posted seems like you already figured it out, but maybe it can help someone else, typically that's the way to override.

Re: My experience with NixOS

#57
post #19

Earlier quoted context omitted.

Do you have any evidence to support your assertion that it was an issue with an organisation rather than the technology? Not all technologies are good. Not all organisations are good. Sometimes it's one. Sometimes it's the other.

Sure. Given code which works for a lot of people, versus some organization composed of people, the fault is probably with people and not with code. This follows from the formal properties of code as mathematical objects, plus the property of probabilistically-checked proofs: If code works for a lot of people, then the code is expected to work generally with high probability. Moreover, there are lots of folks having p…

I think you are too confident about Nix's usability.

I maintain a few open source projects. I have made packages for Redhat, Ubuntu and Arch and updated one Nix package. I love the idea of Nix, but have quit trying to support it and have removed myself as a maintainer.

Re: My experience with NixOS

#58
post #2

NixOS is good, if you found not enough documentation, try Guix and may be GuixSD. It uses guile (scheme) and has fantastic documentation. [1] Earlier Nix had additional NixOps but that too now is available with Guix deploy. I am waiting when I can run Guix within a lxd container, shepherd init still has some rough edges with LXD container init. Both are great piece of software and a new take on building OS and distri…

I recently read that Guix was dropping support for the Linux kernel, but apparently that was a Apr 1 joke. Argh.

https://guix.gnu.org/blog/2020/deprecating-support-for-the-l...

Re: My experience with NixOS

#59

I recently switched to NixOS and have essentially configured my OS from scratch in less than a week and now use it as my main system. The thing to remember about NixOS is it’s not a distribution of KDE or Gnome or manager of anything, it’s a declarative way of configuring those things and allows you to easily roll back changes to entire OS. It’s a little bit of investment to get started but one you get rolling it’s s…

> I recently switched to NixOS and have essentially configured my OS from scratch in less than a week

That doesn't exactly scream ease of use.

Re: My experience with NixOS

#60
post #19

Earlier quoted context omitted.

To me, this is a success story; your organization wasn't sufficiently flexible to adopt new technologies which require rethinking the fundamentals of package management. Take this as a warning sign and re-orient your organization. I do wonder about the "deliberately cryptic" nature of Nix's expression language. It is, in fact, deliberately designed for simplicity, to be a basic syntax for a language that is purely fu…

Do you have any evidence to support your assertion that it was an issue with an organisation rather than the technology? Not all technologies are good. Not all organisations are good. Sometimes it's one. Sometimes it's the other.

> Not all technologies are good. Not all organisations are good. Sometimes it's one. Sometimes it's the other.

And sometimes it's neither; some organizations are perfectly competent at what they do, but for whatever reason are poorly suited to a particular technology that would work fine elsewhere. (Dumb example: a company overwhelmingly built with Microsoft technologies that only has expertise working with that particular stock has basically no chance of being a good fit for nixos)

Post reply on HN