mirror of
https://github.com/davegallant/nix-config
synced 2026-03-03 12:46:34 +00:00
5f456b75a1e573fc827a9fb33620f813a00cb441
Run `man nix.conf` for more information on the `substituters` configuration option. Run `man nix.conf` for more information on the `substituters` configuration option. unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:NixOS/nixpkgs/a571ccf896852ae4fb18a2c23c846ea934b337fa' into the Git cache... • Updated input 'home-manager': 'github:nix-community/home-manager/d3135ab747fd9dac250ffb90b4a7e80634eacbe9?narHash=sha256-/r9/1KamvbHJx6I40H4HsSXnEcBAkj46ZwibhBx9kg0%3D' (2025-12-17) → 'github:nix-community/home-manager/fdec8815a86db36f42fc9c8cb2931cd8485f5aed?narHash=sha256-sWTtmkQujRpjWYCnZc8LWdDiCzrRlSBPrGovkZpLkBI%3D' (2025-12-21) • Updated input 'home-manager/nixpkgs': 'github:NixOS/nixpkgs/c8cfcd6ccd422e41cc631a0b73ed4d5a925c393d?narHash=sha256-3iXM/zTqEskWtmZs3gqNiVtRTsEjYAedIaLL0mSBsrk%3D' (2025-12-15) → 'github:NixOS/nixpkgs/b3aad468604d3e488d627c0b43984eb60e75e782?narHash=sha256-eplAP%2BrorKKd0gNjV3rA6%2B0WMzb1X1i16F5m5pASnjA%3D' (2025-12-20) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c6f52ebd45e5925c188d1a20119978aa4ffd5ef6?narHash=sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8%3D' (2025-12-15) → 'github:NixOS/nixpkgs/b3aad468604d3e488d627c0b43984eb60e75e782?narHash=sha256-eplAP%2BrorKKd0gNjV3rA6%2B0WMzb1X1i16F5m5pASnjA%3D' (2025-12-20) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/3eb6c51f25955007554cc159c85b41c487460852?narHash=sha256-qsnza9ZKO0pPagA/krHmwMg/eXzn/E1LbHc6oDNrnaI%3D' (2025-12-19) → 'github:NixOS/nixpkgs/a571ccf896852ae4fb18a2c23c846ea934b337fa?narHash=sha256-qmGXhC0uTTPHGKDO%2BzzZAhcbboFd19TODCUXgEkI5Eg%3D' (2025-12-21) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/1306659b587dc277866c7b69eb97e5f07864d8c4?narHash=sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4%3D' (2025-12-15) → 'github:NixOS/nixpkgs/c6245e83d836d0433170a16eb185cefe0572f8b8?narHash=sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc%3D' (2025-12-18) • Updated input 'nixvim': 'github:nix-community/nixvim/685d0be1fce70865c71108ef4105749dbd0957f3?narHash=sha256-QtDp8UDjBH0Dr7DgVUQHDU8lgQOHagx3JCRJcMWk5Ms%3D' (2025-12-17) → 'github:nix-community/nixvim/204a2f3d359e01fcf5af4433adc8cdbb434c9ded?narHash=sha256-LLpJEUFNrj6pO8hvkZMjuuBUeCrjJp/PnVSp2huR%2BZA%3D' (2025-12-20) • Updated input 'nixvim/flake-parts': 'github:hercules-ci/flake-parts/5635c32d666a59ec9a55cab87e898889869f7b71?narHash=sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM%3D' (2025-12-11) → 'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-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 mount /dev/vg/home /mnt/home
$ sudo nixos-enter /mnt
$ hostname <hostname>
Navigate to the nix-config directory and run:
just rebuild-boot
Languages
Nix
96.1%
Shell
2.2%
Just
1.7%