mirror of
https://github.com/davegallant/nix-config
synced 2026-03-03 08:36:36 +00:00
277e4f22fee9206ea3b3433ae9547b7f02dab084
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:NixOS/nixpkgs/3aadb7ca9eac2891d52a9dec199d9580a6e2bf44' into the Git cache... unpacking 'github:NixOS/nixpkgs/805ba342d424b11deabad6e1597372a3cfb39a59' into the Git cache... unpacking 'github:davegallant/vpngate/323709b0a17f1cea4af9d1c0b8640a3e5aefed27' into the Git cache... • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/6c5e707c6b5339359a9a9e215c5e66d6d802fd7a?narHash=sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs%3D' (2026-02-11) → 'github:NixOS/nixpkgs/3aadb7ca9eac2891d52a9dec199d9580a6e2bf44?narHash=sha256-O1XDr7EWbRp%2BkHrNNgLWgIrB0/US5wvw9K6RERWAj6I%3D' (2026-02-14) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/16353086a8a444ecf521b69e75234e5515f47db5?narHash=sha256-cRcvYYLgXbkJgOmDcB9BYWZIH%2B9I%2B5hDYRnTnrmGnDI%3D' (2026-02-14) → 'github:NixOS/nixpkgs/805ba342d424b11deabad6e1597372a3cfb39a59?narHash=sha256-GDTqgUN8pI8lE55wTdaFOS%2BxwwOOz/w055SbCLLFTqA%3D' (2026-02-16) • Updated input 'vpngate': 'github:davegallant/vpngate/9892ebe864028919f9ef4b3be60e556ac0cb590a?narHash=sha256-TH06o9U97ZvuoZSHTCIFXYCs3T8aebOz8D5CCwH%2BBcI%3D' (2026-02-14) → 'github:davegallant/vpngate/323709b0a17f1cea4af9d1c0b8640a3e5aefed27?narHash=sha256-mS31U0EK9ARlSeN42N/u/92b9RdyTB4Q/47xJmfyXlQ%3D' (2026-02-14)
nix-config
This repo stores nix configuration to manage my hosts running NixOS and macOS.
The configuration is very specific to my own machines and setup, but it may be a useful reference for anyone else learning or experimenting with nix, whether it be on a personal workstation or a server environment.
❯ macchina
a8888b. Host - dave@hephaestus
d888888b. Machine - Micro-Star International Co., Ltd MS-7C02 1.0
8P"YP"Y88 Kernel - 6.12.61
8|o||o|88 Distro - NixOS 25.11 (Xantusia)
8' .88 DE - KDE
8`._.' Y8. Packages - 1 (cargo), 10998 (nix)
d/ `8b. Shell - fish
dP Y8b. Terminal - alacritty
d8: ::88b. Resolution - 2560x1440, 3840x2160
d8" 'Y88b Uptime - 26m
:8P :888 CPU - AMD Ryzen 7 5700X 8-Core Processor (16)
8a. _a88P CPU Load - 8%
._/"Yaa .| 88P| Memory - 10.7 GB / 32.8 GB
\ YP" `| `.
/ \.___.d| .'
`--..__) `._.'
Prerequisites
- NixOS (Linux)
- Determinate Nix (macOS)
- just
Build
To run a build/rebuild:
just rebuild
Update
To update nixpkgs defined in flake.nix, run:
just update
If there are updates, they should be reflected in flake.lock.
Rollback
To rollback to the previous generation:
just rollback
Garbage collection
To cleanup previous files, run nix garbage collection:
just clean
Restoring from a live USB
If the bootloader for some reason breaks (i.e. motherboard firmware upgrade), restore it from a live USB by running the following commands:
$ sudo cryptsetup luksOpen /dev/nvme0n1p2 crypted-nixos
Enter passphrase for /dev/nvme0n1p2: ********
$ sudo mount /dev/vg/root /mnt
$ sudo mount /dev/nvme0n1p1 /mnt/boot/efi
$ sudo nixos-enter --root /mnt
$ hostname <hostname>
Navigate to the nix-config directory and run:
just rebuild-boot
Languages
Nix
96.1%
Shell
2.2%
Just
1.7%