| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
If you are
then this the installation & setup UI you always wanted!
This setup menu is optimized for:
This tool is not inheritly user-friendly. You should already be familiar with Nix & NixOS or be ready to learn a lot more new stuff before you can start to just use this tool.
If you want to try out NixOS on your first machine, start by downloading an official NixOS ISO and working through the first sections of the NixOS Manual.
The menu itself is intentionally designed to be easy to navigate, even to make this tool accessible to non Linux / NixOS experts. But this is intended to be used by NixOS exports to publish their configurations for use in a blackbox-lite fashion (i.e. where users cannot fix bugs themselves but have to hope that everything just works). And such a release should come with at least some support, e.g. in case of errors during the installation. Because of this, I will not just release a ISO for anyone to just use this setup menu.
This tool replaces the sometimes tedious chore of typing following command each time you need to (re-)install NixOS:
# example command
disko-install --flake "github:Zocker1999NET/server#empty" --mode format --write-efi-boot-entries --disk main /dev/nvme0n1 --disk data /dev/sdaInstead, you get a simple UI guiding you through each installation, asking you:
As a short summary, you should:
The current implementation of this menu requires your configurations to be accessible somehow over the network. The easiest would be to publish your flake on some Git-hosting forge (GitHub, GitLab, Forgejo, …).
Maybe someone will find a way to embed a flake into the installation ISO, but as one purpose of this menu was to always deploy the newest configuration available, without needing to regularly rebuild the ISO, this is mandatory for now.
For example, this could look like:
{
inputs = {
# … (e.g. nixpkgs)
disko-install-menu = {
url = "github:Zocker1999NET/disko-install-menu";
# this is recommended to do (I will NOT regularly update the flake.lock)
# (& should hopefully not introduce any errors)
inputs.nixpkgs.follows = "nixpkgs";
};
};
}The main branch is expected to be as stable as possible.
Because of the nature of Nix, this is really easy to achieve: We can piggy-back on nixpkgs as we see fit.
Assuming you embed everything into your flake.nix, this could look like this (not tested, please report your success / issues):
{
outputs =
{ nixpkgs, disko-install-menu, ... }:
let
inherit (nixpkgs.lib) nixosSystem;
in
{
nixosConfigurations.installer = nixosSystem {
modules = [
# setup live-bootable installer
(
{ config, lib, modulesPath, ... }:
{
imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ];
config = {
isoImage.isoBaseName = "nixos-my-setup";
networking.hostName = "nixos-my-setup";
system.stateVersion = lib.versions.majorMinor config.system.nixos.version;
};
}
)
# configure disko-install-menu
disko-install-menu.nixosModules.default
{
programs.disko-install-menu = {
enable = true;
options = {
# set those to your liking
defaultFlake = "github:Zocker1999NET/server";
defaultHost = "empty";
};
};
}
# and everything else you think you might need …
];
system = "x86_64-linux";
};
};
}Given you are in the directory of your flake and your configuration is called as in the example above, you can build an ISO with following command (use nom for a better visualization):
nix build .#nixosConfigurations.installer.config.system.build.isoImage
Your ISO will then be available as result/iso/*.iso (the only ISO) in that directory.
I assume you will get this working somehow, e.g. see the awesome ArchWiki for an exhaustive list of possibilities.
Be aware that in the current version, the module cannot yet auto-start the installer (feel free to make a PR), so, as of now, you need to type the following (with auto-completion) to start the menu:
sudo disko-install-menu(still shorter & simpler than the whole disko-install command)
The content of this repository is licensed under the MIT license. You are free to use & modify the content of this repository. You are asked to contribute your improvements back to the FLOSS community, e.g. by making a PR into this repository.
A copy of the MIT license is attached to the repository.
| Back | FazBrowse Home | New Git URL |