nixos-config/README.md

42 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2024-07-18 06:08:27 +02:00
# Dotfiles
2024-06-24 16:06:35 +00:00
2024-12-02 01:03:01 +01:00
My NixOS configuration.
2025-05-29 17:04:58 +02:00
## Installation
2024-12-02 01:03:01 +01:00
2025-05-30 15:37:19 +02:00
For disk configuration we use disko, but for secrets management we use sops-nix and the particular setup makes the installation process a bit more involved. It is required that the computer from which the installation is being run has access to the `nixos-secrets` repository, otherwise you will need to manually add the required ssh keys to the installation image.
```bash
# Load into the installer
sudo passwd # Set a root password
# From a machine with network access to the installer
# and access to the nixos-secrets repo
ssh -A root@(installer-ip)
# Set up disks
2025-05-29 21:00:40 +02:00
nix-shell -p disko
2025-05-30 15:37:19 +02:00
disko --mode disko --flake git+https://git.bulthuis.dev/Jan/nixos-config#(system)
exit
# Install NixOS
nixos-install --no-channel-copy --no-root-password --flake git+https://git.bulthuis.dev/Jan/nixos-config#(system)
cd /mnt/persist/system/etc/sops
# Set up host credentials for access to the secrets
touch sops_ed25519_key
chmod 600 sops_ed25519_key
nano sops_ed25519_key
2025-05-29 21:00:40 +02:00
```
If `nixos-install` is being stopped by the OOM-killer, you can try adding `-j 1` to limit the amount of jobs that will be executed at the same time to 1. It might require running nixos-install multiple times untill it has managed to download all requirements and slowly start building the rest of the system.
## Updating
2025-05-29 17:04:58 +02:00
2025-05-29 21:00:40 +02:00
To update the system configuration, it is a single command:
2025-05-30 15:37:19 +02:00
```bash
2025-05-29 21:00:40 +02:00
sudo system-update
```
Or if this shell script has not been installed for some reason:
2025-05-30 15:37:19 +02:00
```bash
sudo nixos-rebuild switch --flake git+https://git.bulthuis.dev/Jan/nixos-config
2025-05-29 17:04:58 +02:00
```
2025-05-29 21:00:40 +02:00
Sometimes it may be necessary to reboot of course.