yipengsun / nix-config

My NixOS/nix-darwin config
2 stars 0 forks source link

nix-config

My NixOS/nix-darwin config.

Switch system config

In the project root:

sudo nixos-rebuild switch --flake ".#<hostname>"

Tricks

Install nix

On non-NixOS, use the Determinate nix installer:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Debug flake

nix repl
# in the resulting nix prompt
> :lf .

zfs auto-snapshot

Enable/disable auto-snapshot with the following command:

sudo zfs set com.sun:auto-snapshot=true <pool>/<fs>

Acknowledgement