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:
- Setting a configuration value requires selecting a key for the
<name>
.
- Setting a configuration allows the manipulation of list entries.
- Each string list entry must match a given regular expression.
- An option such as “services.bitcoind..dbCache” shows two features:
- Configuration values can either be set to “null” or an integer value.
- 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