mirror of
https://github.com/davegallant/nix-config
synced 2026-01-16 09:14:07 +00:00
3c3e3e2a91b86991b19d60f6bdd41e6752232b98
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:NixOS/nixpkgs/64c6c70011813a35bb907cf1079441372aabb13e' into the Git cache... • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/1327e798cb055f96f92685df444e9a2c326ab5ed?narHash=sha256-F4IIxa5xDHjtrmMcayM8lHctUq1oGltfBQu2%2BoqDWP4%3D' (2026-01-12) → 'github:NixOS/nixpkgs/2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a?narHash=sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ%3D' (2026-01-13) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/90086ab7de86c9dcadbce33e38ff31d760fd2939?narHash=sha256-URpwHV8DoUvnTghd9NxK8S29mGx2e4f/sv7ftXklTy8%3D' (2026-01-14) → 'github:NixOS/nixpkgs/64c6c70011813a35bb907cf1079441372aabb13e?narHash=sha256-E4aYb%2B/lx45T/3FcdUmauZXzGWpUfdm62LnwYZAy2LU%3D' (2026-01-15) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38?narHash=sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs%3D' (2026-01-11) → 'github:NixOS/nixpkgs/1412caf7bf9e660f2f962917c14b1ea1c3bc695e?narHash=sha256-AIdl6WAn9aymeaH/NvBj0H9qM%2BXuAuYbGMZaP0zcXAQ%3D' (2026-01-13) • Updated input 'nixvim': 'github:nix-community/nixvim/983751b66f255bbea1adc185364e9e7b73f82358?narHash=sha256-U1fHsZBnFrUil731NHD9Sg5HoiG%2BeSHau8OFuClhwW0%3D' (2026-01-03) → 'github:nix-community/nixvim/503259b749971f431cb4aca7099cd60eadd7a613?narHash=sha256-G621Q9cB1roQxK0C6guNjmWX0CmPA5xN46VD2kTdDEk%3D' (2026-01-15)
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.3%
Just
1.6%