mirror of
https://github.com/davegallant/nix-config
synced 2026-01-06 14:12:31 +00:00
2bd46dd98fada0d841f54ba82af77a0e0ae01198
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... • Updated input 'home-manager': 'github:nix-community/home-manager/d49d2543f02dbd789ed032188c84570d929223cb?narHash=sha256-YmaYMduV5ko8zURUT1VLGDbVC1L/bxHS0NsiPoZ6bBM%3D' (2026-01-01) → 'github:nix-community/home-manager/7a06e8a2f844e128d3b210a000a62716b6040b7f?narHash=sha256-ONYqnKrPzfKEEPChoJ9qPcfvBqW9ZgieDKD7UezWPg4%3D' (2026-01-04) • Updated input 'home-manager/nixpkgs': 'github:NixOS/nixpkgs/89dbf01df72eb5ebe3b24a86334b12c27d68016a?narHash=sha256-tzYsEzXEVa7op1LTnrLSiPGrcCY6948iD0EcNLWcmzo%3D' (2025-12-29) → 'github:NixOS/nixpkgs/64049ca74d63e971b627b5f3178d95642e61cedd?narHash=sha256-yA/CuWyqm%2BAQo2ivGy6PlYrjZBQm7jfbe461%2B4HF2fo%3D' (2026-01-02) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/64049ca74d63e971b627b5f3178d95642e61cedd?narHash=sha256-yA/CuWyqm%2BAQo2ivGy6PlYrjZBQm7jfbe461%2B4HF2fo%3D' (2026-01-02) → 'github:NixOS/nixpkgs/30a3c519afcf3f99e2c6df3b359aec5692054d92?narHash=sha256-8IQQUorUGiSmFaPnLSo2%2BT%2BrjHtiNWc%2BOAzeHck7N48%3D' (2026-01-03) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/00fd7f4997ffc5c8e26f7259f22498dd4dce3c97?narHash=sha256-KnJJy9W50GmucsEueKIyRVYdbnzRc9Jf1Xbh%2B4z2Abw%3D' (2026-01-03) → 'github:NixOS/nixpkgs/9d2a9d6abc3ae7d73bdbc6d92b8123f55e84ad86?narHash=sha256-a2bF6Wxxw8XZ4PmIOsqLznV1pCr160fl90psV1tp0qI%3D' (2026-01-05) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/cad22e7d996aea55ecab064e84834289143e44a0?narHash=sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw%3D' (2025-12-30) → 'github:NixOS/nixpkgs/fb7944c166a3b630f177938e478f0378e64ce108?narHash=sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf%2BOkucw%3D' (2026-01-02)
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%