This repository contains declarative configurations of my machines.
Real machines:
- nixie - daily driver laptop
Build targets:
- thlix - minimal personal desktop
- minix - base of all desktops and ISO builds
- cloud
- Follow the official NixOS installation guide until
NixOS Installationsection - Clone this repo:
git clone https://github.com/mrtnvgr/systems - Create your host (look in
flake.nixandhostsfor examples)- Copy
/mnt/etc/nixos/hardware-configuration.nixtohardware.nix
- Copy
- Install:
nixos-install --root /mnt --flake .#<YOUR-HOST-NAME> - Move this repo to installed system:
mv .systems /mnt/home/<your-username>/ - Reboot:
reboot
- isoplus - LiveISO, heavily compressed, loaded into the RAM for performance
- For persistence support, specify
--special-arg persistence 1while creating the image
- For persistence support, specify
- rawplus - full mutability, image of a regular installation
- Will be slow on regular USB sticks, made for external SSD drives
- Specify
--disk-size <MEGABYTES>while creating the image
- Bring
nixos-generatorsinto the scope:nix shell github:nix-community/nixos-generators - Use the
minixhost or create your own - Generate an image:
nixos-generate --flake .#<YOUR-HOST-NAME> --format-path genfmts/<FORMAT>.nix - Flash:
cat <path-to-image> > /dev/sdX - Only for isoplus with persistence:
- Create a new volume:
fdisk /dev/sdX <<<$'n\np\n\n\n\nw' - Format the volume:
mkfs.ext4 -L <YOUR-HOST-NAME>persistence /dev/sdX3
- Create a new volume:
git-crypt: error: encrypted file has been tampered with!: