This repo stores some cc's nixos and home-manager configurations.
Hint: this repo contains my hardware configuration, you shouldn't directly use the config to build your system.
Run just --list
to see all recipes.
Below are some miscellaneous notes.
Set a temporary proxy for nix-daemon:
#!/usr/bin/env bash
mkdir /run/systemd/system/nix-daemon.service.d
cat > /run/systemd/system/nix-daemon.service.d/override.conf << EOF
[Service]
Environment="http_proxy=<your_proxy>"
Environment="https_proxy=<your_proxy>"
Environment="all_proxy=<your_proxy>"
EOF
systemctl daemon-reload
systemctl restart nix-daemon
Format the repo:
treefmt
Clean the machine:
nh clean all
Get the dependency graph of a package:
nix-store --gc --print-roots | rg -v '/proc/' | rg -Po '(?<= -> ).*' | xargs -o nix-tree
Then type /
and the package name to get the dependency graph.
This nixos config is designed to build remote nixos system on a local machine, use
just push <remote-host>
Here the <remote-host>
is the hostname of the remote machine, which is defined in ssh config, and the recipe is a wrapper of the following command:
nixos-rebuild --target-host {{TARGET}} --use-remote-sudo switch --flake