My NixOS configuration
Find a file
2023-10-24 19:10:14 +02:00
desktop style: remove some unused nix arguments 2023-08-12 19:30:25 +02:00
hardware fix(hardware): add missing plugdev group for zsa udev rules 2023-09-29 14:45:57 +02:00
home feat(editors): ignore cfg_eval proc macros in rust-analyzer 2023-10-24 19:10:14 +02:00
hosts feat(home-server): switch from ddclient to inadyn 2023-10-04 20:17:35 +02:00
lib refactor(flake): optimize structure 2023-09-30 16:40:05 +02:00
modules fix(modules): fix descriptions in inadyn enable options 2023-10-04 20:38:19 +02:00
pkgs fix(printing): switch from ipp everywhere to maintained brlaser fork 2023-08-12 19:29:58 +02:00
scripts feat(scripts): remove swap subvolume & swapfile from setup-partitions 2023-04-11 17:18:00 +02:00
secrets chore: update Cloudflare API token 2023-10-04 18:39:05 +02:00
services refactor: use normal wyoming-faster-whisper again 2023-10-24 18:50:11 +02:00
system feat(vpn): enable quantum-resistant wireguard tunnel 2023-09-30 17:43:36 +02:00
templates docs: update dotnet template 2021-03-04 15:11:09 +01:00
virtualisation fix(virtualisation): specify sub{u,g}id ranges for containers instead of root 2023-09-30 02:37:53 +02:00
.editorconfig style: add .editorconfig 2020-03-21 16:54:32 +01:00
.env.example chore: add restic variables to .env.example 2022-05-12 11:45:10 +02:00
.envrc chore: add restic secrets to .env 2022-05-09 12:26:12 +02:00
.gitignore chore: extend .gitignore 2022-08-08 23:00:01 +02:00
.gitlab-ci.yml build(ci): add check job & improve build 2022-08-10 12:26:39 +02:00
flake.lock feat(flake): improve firefox-addons & arkenfox-userjs inputs 2023-09-30 03:31:56 +02:00
flake.nix feat(modules): add inadyn NixOS module 2023-10-04 20:16:44 +02:00
LICENSE add LICENSE 2020-07-03 08:48:51 +00:00
overlays.nix refactor(flake): optimize structure 2023-09-30 16:40:05 +02:00
README.md docs(README): add agenix instructions 2022-10-04 11:10:43 +02:00

felschr's NixOS configuration

Installation

Clone the configuration into /etc/nixos.

On a new machine run:

scripts/setup-partitions

Then move the resulting /mnt/etc/nixos/hardware-configuration.nix to ./hardware/<config>.nix. Update the configuration according to the script output, if necessary. Btrfs mount options likely need to be added, for example. Copy the configuration from /etc/nixos to /mnt/etc/nixos.

Reference this hardware config in a nixosConfigurations.<config> section in flake.nix.

Now set up a device key that will be used by agenix. Create a new key and re-encrypt the secrets on an existing device & pull the changes.
To create a new key run:

mkdir -p /mnt/etc/secrets/initrd
ssh-keygen -t ed25519 -N "" -f /mnt/etc/secrets/initrd/ssh_host_ed25519_key

You will likely need to temporarily set age.identityPaths for the installation to succeed:

age.identityPaths = "/etc/secrets/initrd/ssh_host_ed25519_key";

To install run the following command where <config> matches outputs.nixosConfigurations.<config> in flake.nix:

nixos-install --flake '/mnt/etc/nixos#<config>'

After the installation finished, set a password for the user:

passwd <user>

Updating

Update all flake inputs:

nix flake update

Update a specific flake input:

nix flake lock --update-input <input>

Rebuilding the system

Rebuild the system:

sudo nixos-rebuild switch

Rebuild the system for a remote machine:

sudo nixos-rebuild switch --flake '/etc/nixos#<config>' --target-host user@hostname --use-remote-sudo