MyNixOS: Flake-centric website for Nix/NixOS configs (v. 0)

Hello! I’m posting to announce MyNixOS, a small Nix/NixOS dedicated website I started building last year. During quarantine I wanted to grok a new technology, and spent the time reading Nix manuals. I’ve really enjoyed using NixOS to manage my software environments, and wanted to build a way to create and share Nix configurations.

Today I’m posting version zero of the website, with a link to sign up for the alpha version when it becomes available. Currently the site can be used to discover indexed content. Most of the packages/options in the Nix registry are indexed (missing: agda/fenix/mach-nix/nixos-homepage/blender-bin). The plan is to follow a GitHub model, where core functionality stays free, and premium features are planned to fund further development.

Project website: https://www.mynixos.com/
Project chat: https://matrix.to/#/#mynixos:matrix.org

Fun feature: Press O/P to navigate to random options/packages after the index has been loaded (shown as a green icon at the bottom after performing a search).

PS: Note that the first search is slower as it fetches the search index. Following searches will be quicker.

8 Likes

The site looks great! Quick question, I’m new to Nix/NixOS and I’m struggling to figure out how this differs from the search at NixOS Search - Loading... ?

2 Likes

Hi @binarybana ! Cool to see other people new to Nix/NixOS. Regarding differences, this is my understanding:

In scope, NixOS Search is the stable and official way to search NixOS, while MyNixOS is an experiment to allow creating and sharing Nix/NixOS configurations. Currently, version zero of MyNixOS is available, which can only be used to discover content. This makes the sites seem pretty similar currently, but the differences will become more clear with the alpha version.

There’s also current practical differences, such as:

  • NixOS Search searches more fields than MyNixOS, such as the description field of options/packages.
  • NixOS Search offers more elaborate filtering of search results.
  • MyNixOS uses a local search index which gives faster searches.
  • MyNixOS indexes certain additional content, e.g. home-manager options.

I’ve been working on a round of changes which will be posted this week, including a changelog to keep track :slight_smile: If there’s any functionality you are looking for, please post here or use the sign-up form on the site.

1 Like

An updated version of the site is now live (v0.0.5), which includes executables from nix-index as part of the search index (best effort made to filter correctly for executables). Thanks to @x10an14 for the suggestion! :slight_smile:

Changelog: MyNixOS

1 Like

Hello!

I’m posting a small update as the first alpha version of MyNixOS is now live.

To try out the MyNixOS alpha, please visit: Sign-up to MyNixOS

The initial MyNixOS alpha is being released as a minimally-useful version in order to start user testing, and to make it possible to ship smaller features more often, instead of having a large separate alpha branch.

Available alpha features:

  • Creating and sharing a flake configuration
    • After logging in to MyNixOS, click the “create” button on the upper right of the screen to start a new flake.
    • Create - MyNixOS
  • Adding and removing a package from a given flake configuration
    • After starting a flake and selecting it as your current flake using the flake selector, navigate to a package and click “Add to config” (currently limited to nixpkgs packages).
    • A package such as “roboto” will be added to the “fonts.fonts” config of your current flake.
    • A package such as “sl” will be added to the “environment.systemPackages” config option of your current flake.
  • Setting configuration options for a given flake configuration
    • After starting a flake and selecting it as your current flake using the flake selector, navigate to an option to assign it a configuration value.
    • An option such as “systemd.user.targets..requisite” shows three features:
      1. Setting a configuration value requires selecting a key for the <name>.
      2. Setting a configuration allows the manipulation of list entries.
      3. Each string list entry must match a given regular expression.
    • An option such as “services.bitcoind..dbCache” shows two features:
      1. Configuration values can either be set to “null” or an integer value.
      2. Configuration values must be integers between 4 and 16384 as set by the option constraints.
    • An option such as “time.timeZone” has a custom option type enabling selection of a timezone value.
    • Further option support will be added to ensure that all option types can be manipulated, as well as enable adding arbitrary settings, and enable raw editing of all options settings.
  • Releasing a flake
    • Navigate to your flake by clicking the flake selector to the upper right after selecting a flake. From the flake configuration page you can select the “release” button in the “versions” tab, which will create a release. From the “versions” page you can then get the link to download your release as a tarball.

An easy way to get started with testing MyNixOS is to add the tarball as an input to a flake you are already using, e.g.:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs";
    myflake.url = "https://api.mynixos.com/[USERNAME]/[FLAKENAME]/archive/latest.tar.gz";
  };
  outputs = inputs@{ self, nixpkgs, myflake, ... }
  {
    nixosConfigurations.myMachine = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ ./configuration.nix myflake.nixosModules.default ];
    };
  };
}

Remember to update your flake lockfile after each new release in the web interface:

nix flake lock --update-input myflake

The following constraints have been chosen for the initial MyNixOS alpha version:

  • Single flake editing in internal format.
    • Support for converting existing Nix files to an internal format is a possible future addition.
  • Single default NixOS module.
    • Support for multiple modules is currently supported by the API, and web client support is planned to be added soon.
  • No support for NixOS configuration, overrides, or overlays.
    • Support for NixOS configurations is planned to be added soon, while overrides and overlays are planned to be delayed until later.
  • No specific support for home-manager.
    • Support for correctly using home-manager options is planned to be added soon.
  • No support for resource files.
    • Support is planned to be added soon.
  • No support for linking flakes directly.
    • Support is planned to be added soon.
  • No support for multi-channel flakes.
    • Partial support is planned to be added soon.

There’s a long list of planned features, but I’m trying to arrange the development to make the project useful as soon as possible. The project is actively developed to create further features, which can be tracked at: Changelog - MyNixOS

Support is available in: https://matrix.to/#/#mynixos:matrix.org

Hosted by Flying Circus.