nixos-generators VS nixpkgs

Compare nixos-generators vs nixpkgs and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
nixos-generators nixpkgs
20 979
1,592 16,249
5.3% 3.6%
8.1 10.0
6 days ago 3 days ago
Nix Nix
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

nixos-generators

Posts with mentions or reviews of nixos-generators. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-26.
  • NixOS-generators – Collection of VM and Container disk image builders for NixOS
    4 projects | news.ycombinator.com | 26 Mar 2024
  • NixOS: Declarative Builds and Deployments
    13 projects | news.ycombinator.com | 14 Jan 2024
    https://github.com/nix-community/nixos-generators
  • NixOS RFC 136 accepted: A plan to stabilize the new CLI and Flakes incrementally
    11 projects | news.ycombinator.com | 12 Aug 2023
    Those Linode instructions are about installing an OS from an installation ISO from Linode's rescue mode. -- I'd consider that more a 'plus' to Linode that you get to be able to install whatever unsupported Linux on Linode's VMs. But, of course it's not as smooth as the officially supported images.

    Sibling comment mentions that NixOS provides ways to build VM images (e.g. https://github.com/nix-community/nixos-generators has a generator specifically for Linode).

    Another option is to use nixos-infect, which will replace a Linux distribution with a NixOS distribution. https://github.com/elitak/nixos-infect

    > At that point, I feel like all of the repeatability gains are gone. If I want to spin up a fresh server, I have to read a guide and set stuff up by hand?

    Just as with ansible, "git pull to deploy". You'd keep a copy of your NixOS configuration.nix somewhere else, and would be able to apply it later.

    > it really does let me just get a new VPS and deploy to it very fast

    Using a tool you're familiar with to get the job done is going to be faster than learning to use a tool you're unfamiliar with.

    I believe much of the use of NixOS is for hobby stuff, and for personal machines. (c.f. "In what environments do you use Nix", Development (1242) vs Home Server (845) vs Production (386) https://discourse.nixos.org/t/2022-nix-survey-results/18983).

  • Questions about Nix
    1 project | /r/NixOS | 17 Jun 2023
  • Couple of noob questions
    6 projects | /r/Nix | 20 May 2023
    If you need to generate lxc container in NixOS then perhaps this repo might be useful: https://github.com/nix-community/nixos-generators this article uses it https://www.thedroneely.com/posts/running-nixos-linux-containers/
  • disko-images - Create qcow2 images from NixOS + disko configuration
    3 projects | /r/NixOS | 18 May 2023
    You might wanna check out nix-community/nixos-generators, it’s maintained by the same dude as Disko
  • How to do machine specific config on EC2 using an official nixos ami?
    2 projects | /r/NixOS | 1 Apr 2023
    You can look at nixos-generators for support code that well let you take existing configs and build a variety of bootable images from them.
  • Flake to make NixOS iso
    2 projects | /r/NixOS | 21 Mar 2023
    You should take a look at NixOS Generators, it's a flake with configs to build common formats like ISO, LXC, Docker, etc. I use that to generate an ISO with my config, specifically the packages.iso section.
  • Need help with NixOs VM Generation
    2 projects | /r/NixOS | 25 Feb 2023
    I am trying to make use of https://github.com/nix-community/nixos-generators to generate qcow2 images from a NixOs configuration. Since it will be used with Scaleway, they require an efi bootable image.
  • [NixOS] How to Migrate From one Server to another? KVM to VMware
    1 project | /r/linuxquestions | 31 Jan 2023
    I haven't migrated machines from one vm provider to vmware, but I have provided a number of pregenerated nixos images (along the line of https://github.com/nix-community/nixos-generators) to clients to install onto vmware (and other - hyperv, xen, qemu, physical) hosts.

nixpkgs

Posts with mentions or reviews of nixpkgs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-06-03.
  • Show HN: Brioche – A new Nix-like package manager
    6 projects | news.ycombinator.com | 3 Jun 2024
    Agreed. NixOS is a marvel of engineering to me, and kind of hard to go back from once you get used to it. Automatic snapshotting on every configuration change, the entire system state being configurable through text files and therefore never being ambiguous, being able to temporarily install stuff without it polluting your path for forever by using nix-shells, clearly being able to see and define stuff like boot parameters and kernel modules are just insanely wonderful things, all while still using (I think) a vanilla kernel and really no runtime overhead, allowing you to make an insanely lean system without ever being unsure if you're missing something. In my mind about as close to an "objectively better" way to handle an OS (at least for people who are technical). I have no desire to go back to any other distro for my server.

    But the Nix language itself is really quite annoying. I mean, I've more or less gotten used to its annoyances, and I do think that some of the DSLs it has are excellent (I really like the Nginx and systemd configuration stuff, for example), and a lot of the configs are just `services.myservice.enable = true` which is fine, but a lot of the time I'm kind of confused about what syntax is allowed and how loops work and the like. It's not horrible or anything, just a bit annoying because I'll occasionally have to do a nixos-rebuild like three or four times because I messed up some subtle syntax, and it's especially annoying if I have to go dig at the root Nix package to find out what I did wrong [1].

    I think decentralizing stuff in the form of flakes might be able to help with this, if for no other reason the area in which you'd be forced to look for configuration stuff could be reduced, but I do think NixOS would benefit from some rearchitecture.

    [1] Which happened yesterday with an ethernet card configuration: https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modu...

  • Linux virtual machines, with a focus on running containers
    9 projects | news.ycombinator.com | 27 May 2024
    I agree NixOS + docker/podman-compose is a good compromise but one has to be aware NixOS still run podman as root (1) [0]. What is very scary and defeat the purpose of rootless container.

    - [0] https://github.com/NixOS/nixpkgs/issues/259770

  • Enlightenmentware
    22 projects | news.ycombinator.com | 20 May 2024
    I don't think there's a right way to do it, you are correct in that learning NixOS is pretty tedious.

    Re: flakes, my personal opinion is to use flakes. While Flakes are imperfect, they still provide a lot of functionality that Nix doesn't otherwise have. In my mind, it's like Nix's equivalent of "Go modules" or something like that. I do feel like people who do not like flakes make many valid points (the boilerplate, the fact that the top-level flake expression is a subset of Nix for some reason, etc.) but the argument isn't that those problems shouldn't be solved, it's that flakes are a sub-optimal design. Since they're so proliferated throughout the ecosystem though, it is quite unlikely that Nix or any prominent fork will outright drop flakes support any time in the near future. For better or worse, Flakes are part of the Nix ecosystem for the foreseeable future. In my opinion, one may as well take advantage of that.

    If you haven't already, I'd get your feet wet with installing Nix on a non-NixOS machine first, and please feel free to ask questions about Nix in the NixOS Discourse "Help" section.

    I have some recommendations:

    1. https://github.com/nix-community/nix-direnv - Since Nix derivations usually wrap around other build systems, the entire derivation is recomputed when any file in it changes; using direnv, you can just get your normal dev tools upon cd'ing into your project directories. This gives you a lot of the benefits of Nix during local development, but with your normal stack, and without needing to globally install anything.

    2. If you are trying to build something, chances are you can find inspiration in Nixpkgs. Are you curious how you might package a Bevy game? No problem: literally search "bevy" on the Nixpkgs GitHub repo and see what comes up. I found a derivation that does: https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/jump...

    3. If you use flakes, you should keep the flake "schema" handy. There are a lot of different kinds of flake outputs and there are different ways to specify the same thing, which is somewhat needlessly confusing; keeping the flake schema handy will make it easier to understand what Nix is looking for in a flake, which might make it easier to see what's going on (especially if it's obfuscated.) The most important takeaway here: A command like `nix run flake#attr` will try multiple different attributes. https://nixos.wiki/wiki/flakes#Flake_schema

    4. Likewise, I really recommend reading up on what NixOS modules are. NixOS modules are the basis for configurations on NixOS, and having a clear understanding of what is even going on with them is a good idea. For example, you should understand the difference between the Nix language's `import` directive, and using the NixOS modules `imports` attribute to import other NixOS modules. Understanding how the configuration merge works saves a lot of headache, makes it easier to understand how people's configurations works, and also makes it easier to modularize your own NixOS configurations, too. https://nixos.wiki/wiki/NixOS_modules

    Unfortunately though, there's just no way to make it "click", and I can't guarantee that it's worth all of the effort. For me, I felt it was, but yes, there's no one correct way to do it.

    But please feel free to ask questions if anything seems confusing.

  • Tracexec: TUI for tracing execve and pre-exec behavior
    5 projects | news.ycombinator.com | 8 May 2024
    This will drop you into a shell where `tracexec` is installed.

    [1]: https://github.com/NixOS/nixpkgs/pull/310158

  • Nix: The Breaking Point
    3 projects | news.ycombinator.com | 29 Apr 2024
    I don't think so. The article is probably intended for the Nix community, so the author doesn't need to convince HN that something is going on. If as an outsider you are interested then you need to look into it yourself, the community has no obligation to make their internal conflicts legible to the outside world.

    As an outsider myself, it certainly looks like something is going on as more than 20 Nixpkg maintainers left in a week: https://github.com/NixOS/nixpkgs/issues?q=label%3A%228.has%3...

  • Maintainers Leaving
    1 project | news.ycombinator.com | 26 Apr 2024
  • Air Force picks Anduril, General Atomics to develop unmanned fighter jets
    1 project | news.ycombinator.com | 25 Apr 2024
    https://github.com/NixOS/nixpkgs/commits?author=neon-sunset
  • Eelco Dolstra's leadership is corrosive to the Nix project
    6 projects | news.ycombinator.com | 22 Apr 2024
    I see two signers in the top 6 displayed on https://github.com/NixOS/nixpkgs/graphs/contributors
  • 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
    6 projects | news.ycombinator.com | 19 Apr 2024
    For a single file script, nix can make the package management quite easy: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-f...

    For example,

    ```

  • NixOS/nixpkgs: There isn't a clear canonical way to refer to a specific package
    1 project | news.ycombinator.com | 9 Apr 2024

What are some alternatives?

When comparing nixos-generators and nixpkgs you can also consider the following projects:

poetry2nix - Convert poetry projects to nix automagically [maintainer=@adisbladis]

asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

NixOS-docker - DEPRECATED! Dockerfiles to package Nix in a minimal docker container

Home Manager using Nix - Manage a user environment using Nix [maintainer=@rycee]

nix - Nix, the purely functional package manager

git-lfs - Git extension for versioning large files

nix-gaming - Gaming on Nix

easyeffects - Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications

nixops - NixOps is a tool for deploying to NixOS machines in a network or cloud.

spack - A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

digga - A flake utility library to craft shell-, home-, and hosts- environments.

waydroid - Waydroid uses a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured