mirror of
https://github.com/davegallant/nix-config
synced 2026-03-03 04:26:36 +00:00
7a939895ddee0ef0825450d5c1f1d81583b48d66
unpacking 'github:lnl7/nix-darwin/08585aacc3d6d6c280a02da195fdbd4b9cf083c2' into the Git cache... unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:nix-community/home-manager/75ed713570ca17427119e7e204ab3590cc3bf2a5' into the Git cache... unpacking 'github:NixOS/nixpkgs/3ceaaa8bc963ced4d830e06ea2d0863b6490ff03' into the Git cache... unpacking 'github:NixOS/nixpkgs/3a2d43564098b3b4684800f2f1f291cfa7bda101' into the Git cache... unpacking 'github:NixOS/nixpkgs/88d3861acdd3d2f0e361767018218e51810df8a1' into the Git cache... unpacking 'github:nix-community/nixvim/b8f76bf5751835647538ef8784e4e6ee8deb8f95' into the Git cache... unpacking 'github:davegallant/vpngate/9e9992e643e44896a6c7f8070e968f0d85e4cea4' into the Git cache... • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/edb50bc5e0492dc04269519dc7e10c9a9a80c8a0?narHash=sha256-emM5EkMW5eSjwc2rd8DGorgnbcmWyS7F0NtbvYhILKE%3D' (2026-01-21) → 'github:NixOS/nixpkgs/3a2d43564098b3b4684800f2f1f291cfa7bda101?narHash=sha256-Elwa0Q9bMnack6z1dOqUeaPNUDL5J6bnHuuL7VzzSsY%3D' (2026-01-23) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/80e4adbcf8992d3fd27ad4964fbb84907f9478b0?narHash=sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM%3D' (2026-01-20) → 'github:NixOS/nixpkgs/88d3861acdd3d2f0e361767018218e51810df8a1?narHash=sha256-MJ27Cy2NtBEV5tsK%2BYraYr2g851f3Fl1LpNHDzDX15c%3D' (2026-01-21) • Updated input 'nixvim': 'github:nix-community/nixvim/503259b749971f431cb4aca7099cd60eadd7a613?narHash=sha256-G621Q9cB1roQxK0C6guNjmWX0CmPA5xN46VD2kTdDEk%3D' (2026-01-15) → 'github:nix-community/nixvim/b8f76bf5751835647538ef8784e4e6ee8deb8f95?narHash=sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f%2BLDd8j%2Bw%3D' (2026-01-22) • Updated input 'nixvim/flake-parts': 'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-15) → 'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11) • Updated input 'nixvim/nuschtosSearch': 'github:NuschtOS/search/e29de6db0cb3182e9aee75a3b1fd1919d995d85b?narHash=sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY%3D' (2025-10-29) → 'github:NuschtOS/search/b6f77b88e9009bfde28e2130e218e5123dc66796?narHash=sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS%2B2qcf/Pa0kQEc%3D' (2026-01-12)
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%