mirror of
https://github.com/davegallant/nix-config
synced 2026-01-11 01:04:07 +00:00
e2a092ee80f0cf6e2dcd0ab7492bb838c28352d5
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:nix-community/home-manager/8c8a16d41353a174767c38b962359b51a56ca02e' into the Git cache... unpacking 'github:NixOS/nixpkgs/d351d0653aeb7877273920cd3e823994e7579b0b' into the Git cache... unpacking 'github:NixOS/nixpkgs/f244e841501d61e8fda288c2a9f56ca46e4429de' into the Git cache... unpacking 'github:NixOS/nixpkgs/5912c1772a44e31bf1c63c0390b90501e5026886' into the Git cache... • Updated input 'home-manager': 'github:nix-community/home-manager/c08430923ed417abc653884328a39e98496cfd0f?narHash=sha256-5SbmsLMgxzPd9YMbFR4IHfOXv6bjWs%2Bdfl6IbSq3r7s%3D' (2026-01-07) → 'github:nix-community/home-manager/8c8a16d41353a174767c38b962359b51a56ca02e?narHash=sha256-D3QzdIT11J66I4mzwmIpAGLzPAcbCS2VaKN8fmOe6%2BE%3D' (2026-01-08) • Updated input 'home-manager/nixpkgs': 'github:NixOS/nixpkgs/3c9db02515ef1d9b6b709fc60ba9a540957f661c?narHash=sha256-2GffSfQxe3sedHzK%2BsTKlYo/NTIAGzbFCIsNMUPAAnk%3D' (2026-01-05) → 'github:NixOS/nixpkgs/d351d0653aeb7877273920cd3e823994e7579b0b?narHash=sha256-r4GVX%2BFToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE%3D' (2026-01-07) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/3c9db02515ef1d9b6b709fc60ba9a540957f661c?narHash=sha256-2GffSfQxe3sedHzK%2BsTKlYo/NTIAGzbFCIsNMUPAAnk%3D' (2026-01-05) → 'github:NixOS/nixpkgs/d351d0653aeb7877273920cd3e823994e7579b0b?narHash=sha256-r4GVX%2BFToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE%3D' (2026-01-07) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/c0fc386a2f5f7027de84c302659f16c93f8da151?narHash=sha256-Eu0eZDABynDaCPRr5bce4UpVcmRHioxG8pJTpPPMrWE%3D' (2026-01-07) → 'github:NixOS/nixpkgs/f244e841501d61e8fda288c2a9f56ca46e4429de?narHash=sha256-UP55tLruQPznPL6IMxTzRtx/jhvVhxMuF%2BCUpH78New%3D' (2026-01-08) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5?narHash=sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i%2BbwD6XxMb8A%3D' (2026-01-05) → 'github:NixOS/nixpkgs/5912c1772a44e31bf1c63c0390b90501e5026886?narHash=sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4%3D' (2026-01-07)
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%