mirror of
https://github.com/davegallant/nix-config
synced 2026-03-03 04:26:36 +00:00
547cf04c2d2575a75e27c95b9e50a0bbb0db8d8b
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:NixOS/nixpkgs/113262937617e701971b5ee47779b5b42c426b03' into the Git cache... • Updated input 'home-manager': 'github:nix-community/home-manager/75ed713570ca17427119e7e204ab3590cc3bf2a5?narHash=sha256-TtjKgXyg1lMfh374w5uxutd6Vx2P/hU81aEhTxrO2cg%3D' (2026-01-20) → 'github:nix-community/home-manager/366d78c2856de6ab3411c15c1cb4fb4c2bf5c826?narHash=sha256-tNqCP/%2B2%2BpeAXXQ2V8RwsBkenlfWMERb%2BUy6xmevyhM%3D' (2026-01-28) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/078d69f03934859a181e81ba987c2bb033eebfc5?narHash=sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms%3D' (2026-01-22) → 'github:NixOS/nixpkgs/fa83fd837f3098e3e678e6cf017b2b36102c7211?narHash=sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o%3D' (2026-01-28) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/2aacce898087dc1bc02fade2d7c224c39f0ffc62?narHash=sha256-IadKC39b5Deb4j6bEFEBGwv9sgcFNlLzjImOpyGs9dw%3D' (2026-01-24) → 'github:NixOS/nixpkgs/113262937617e701971b5ee47779b5b42c426b03?narHash=sha256-3tmIqkSME5Dyb0AVIm8sS5SbyB41qjbqn2/as8CJqQU%3D' (2026-01-29) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/88d3861acdd3d2f0e361767018218e51810df8a1?narHash=sha256-MJ27Cy2NtBEV5tsK%2BYraYr2g851f3Fl1LpNHDzDX15c%3D' (2026-01-21) → 'github:NixOS/nixpkgs/bfc1b8a4574108ceef22f02bafcf6611380c100d?narHash=sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI%3D' (2026-01-26)
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%