nixos
This repository contains my configuration for my Nixos systems. I don't provide any garantuees that it will work on other systems. In addition some of the scripts required for installation will destroy your data when used.
Originally forked from https://git.2li.ch/Nebucatnetzer/nixos
VM installation
This allows you to setup a VM with minimal effort. However this requires some prerequisites.
- A VM running the minimal NixOS ISO reachable with SSH under nixos@nixos.home.kyrych.uk.
- The VM runs UEFI.
- You've set a password for the nixos user.
./scripts/install_new_vm.xsh
- Provide the required information and wait until the script is finished.
- Reboot and profit!
Creating fresh development VMs
TODO: add example CLI command to create VMs using qm
- Create a new VM in Proxmox (use UEFI instead if BIOS). The VM will have its hostname set to
nixos
and will be available within local network under the domain name ofnixos.home.kyrych.uk
. - Create a new system under
systems
directory. - Open the vm's console in Proxmox and set a password for the
nixos
user. This is needed for - Run
./scripts/install_over_ssh.sh
. If this script fails withWARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
, runssh-keygen -R nixos.home.kyrych.uk
and retry.
Creating an LXC container with NixOS
Currently not working
- Run this on proxmox node:
pct create $(pvesh get /cluster/nextid) \
local:vztmpl/nixos-22.05-default_188886451_x86_64.tar.xz \
--description nixos-template \
--hostname nixos-template \
--arch amd64 \
--ostype unmanaged \
--cores 2 \
--net0 name=eth0,ip=dhcp,bridge=vmbr0,firewall=1 \
--storage local-zfs \
--cmode console \
--features nesting=1 \
--unprivileged true \
--template true
Hardware installation
curl -L https://github.com/dmytrokyrychuk/nixos/archive/refs/heads/main.tar.gz | tar xz && mv nixos-main nixos
cd nixos && nix-shell
sudo python3 scripts/format-disk.py
sudo nixos-install --no-root-passwd --root /mnt --impure --flake .#SYSTEMNAME
Update remote systems
Simply run the script scripts/update_all_systems.xsh
and it will iterate over
all defined systems.
The script requires Xonsh but can be easily adapted to BASH or similar.
Non-Nixos System
scripts/install-home-manager.sh