NixOS is a Linux distribution with a unique package management system, Nix, offering precise control and reproducible configurations. It follows a declarative and functional programming approach, ensuring system reliability and easy rollback.
You could directly use this but it's better to extract the pieces you want in your own config. Checkout nix-starter-config for a good initial starting point for NixOS with flakes.
git clone --recursive --depth=1 [email protected]:martijnboers/nixos.git ~/Nix
nixos-rebuild switch --flake ".?submodules=1" --use-remote-sudo
doas tailscale up --login-server https://headscale.donder.cloud
pgrok init --remote-addr hadouken.machine.thuis:6666 --token {token}
gpg --import private.key
SSHPASS=<pwd> nix run github:nix-community/nixos-anywhere -- --flake .#shoryuken --env-password root@<ip>
nix run nixpkgs#nixos-generators -- -f sd-aarch64 --flake .#tenshin --system aarch64-linux -o ~/pi.img
nix repl
nix-repl> :lf /home/martijn/Nix
nix-repl> nixosConfigurations.[TAB]
borg list ssh://[email protected]/./repo
borgfs -f ssh://[email protected]/./repo::hadouken-default-2024-03-24T00:00:00 /mnt/restore