Dix is a hardcore challenge for NixOS users: build NixOS each time with nothing more than one line of shell command.
This challenge is inspired by https://github.com/tsoding/Crust.
- Start with this template Bash command:
NIX_CONFIG="experimental-features=flakes" nixos-rebuild switch --flake $(nix-build --no-out-link --expr 'let nixpkgs = fetchTarball "https://github.com/nixos/nixpkgs/tarball/nixos-unstable"; pkgs = nixpkgs.legacyPackages.x86_64-linux; in pkgs.writeText "flake.nix" "{ inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; outputs = { self, nixpkgs }: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = \"x86_64-linux\"; modules = [ ({ ... }: { }) ] } } }"')
TODO: this command is written in 10 minutes and not tested, will test in some time
- Configure your NixOS by editing and running that command in any shell.
- Shell history will be the only way to store your NixOS configuration.
- If your configuration becomes missing from the shell history, you have to start over.
- The configuration cannot read from any file on disk except /nix/store.
github:nixos/nixpkgs/nixos-unstableis the only flake input.- Fetchers are allowed.
- Rolling back to a previously built generation is allowed.
The list of rules may change. The goal is to make configuration in NixOS fun.