This config is designed to be used with own precise nixos channel pin.
Not that it wouldn’t work with default nixos-25.11 channel
but I like to manually update it and to store the precise pin in the repo
in order to be sure my machines are 100% in sync.
In short, to have better reproducibility.
Please see --help info from this script:
channels/manage.raku --helpIn order to fully setup channels you just have to run:
channels/manage.raku fetch
channels/manage.raku overrideP.S. Mind that the second command (override) requires “sudo” access.
-
Load into NixOS Live CD
-
Prepare file system according to a hardware configuration of a machine (see
hardwaredirectory, write new one for new hardware) and mount everything into/mntas the root of the system you’re about to build.N.B. Keep in mind that for encrypted
/bootyou need to use LUKS1 instead of LUKS2 because GRUB doesn’t support LUKS2. -
Clone this repo into
/mnt/etc/nixosandcdto that dir:sudo mkdir /mnt/etc sudo git clone https://github.com/unclechu/nixos-config.git /mnt/etc/nixos cd /mnt/etc/nixos -
Fetch and override channels (for your booted NixOS Live CD):
channels/manage.raku fetch channels/manage.raku override
-
Link related hardware config as
machine-specific.nix:sudo ln -s hardware/wenzel-nixos-pc.nix machine-specific.nix
Or create a new one if it’s a new machine (you can use
nixos-generate-configto create one automatically, see https://nixos.org/manual/nixos/stable/index.html#sec-installation-installing for details). -
Install:
sudo nixos-install --no-root-passwd --root /mnt
-
Change the password in order to be able to login:
sudo nixos-enter --root /mnt -c 'passwd wenzel' -
Reboot into the built system:
reboot
-
After booting to the installed NixOS override channels for it:
(cd /etc/nixos && channels/manage.raku override)
An alternative configuration optimized for real-time audio processing. It’s built as a separate system profile so that the default configuration is available as usual but you can boot to one for audio processing when you need it.
You can use build-audio-profile.sh script to build that configuration as a
separate profile. If you provide either boot or switch subcommand argument it will also build
the regular default profile using boot subcommand for nixos-rebuild so that the default profile
boots by default and “audio” profile is available as an option.
./build-audio-profile.sh bootOr (in case you are already booted to the “audio” system profile):
./build-audio-profile.sh switchApart from general “nixos” and “nixos-unstable” channels some another external dependencies (such as Home Manager and my own nix-utils) are managed using niv tool. Those dependencies are described in nix/sources.json.
You don’t need niv to install the dependencies, only to update them, remove or add a new one (but you also can as well manually edit that nix/sources.json file).
N.B. “nixos” channel can’t be managed by niv in a NixOS configuration because it’s imported even
before configuration.nix is called. configuration.nix is called with pkgs argument which is
imported already. Also all the root system dependencies are provided by that channel.
MIT — For the code of this repository. Some third-party dependencies may have different licenses.