mirror of
https://github.com/davegallant/nix-config
synced 2026-03-03 08:36:36 +00:00
5dc1651d3d6cb1b9659b2c4666b2b51e6dd6dba0
unpacking 'https://flakehub.com/f/DeterminateSystems/determinate/%2A' into the Git cache... unpacking 'github:NixOS/nixpkgs/2e642b6926edfdee3d21a9f62e987bc263ee8108' into the Git cache... • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/fa56d7d6de78f5a7f997b0ea2bc6efd5868ad9e8?narHash=sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU%3D' (2026-02-16) → 'github:NixOS/nixpkgs/6d41bc27aaf7b6a3ba6b169db3bd5d6159cfaa47?narHash=sha256-bxAlQgre3pcQcaRUm/8A0v/X8d2nhfraWSFqVmMcBcU%3D' (2026-02-18) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/041e1c037ad934ab5e7917d6b9705407a745a169?narHash=sha256-Jj9AddtMkoxT2Nu7nYxp5F9vnh%2BwR6eWqA70Gj%2BsZIM%3D' (2026-02-19) → 'github:NixOS/nixpkgs/2e642b6926edfdee3d21a9f62e987bc263ee8108?narHash=sha256-6WfepHZmH2/FAizP2BsSf1433a3TBNCQnKY1C7/EkVk%3D' (2026-02-20)
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%