My NixOS/nix-darwin config.
In the project root:
sudo nixos-rebuild switch --flake ".#<hostname>"
First, generate a set of SSH keys for the new host:
gen-host-ssh-keys.sh <hostname>
# output to gen/<hostname>
Then, rekey secrets so the new host can decrypt them:
cd secrets
# then add a pubkey from the new host to secrets.nix
agenix -r
Finally, use nixos-anywhere
to build on current machine then configure the
new remote host:
nixos-anywhere --extra-files gen/<hostname> --flake .#<hostname> nixos@<host_ip> --no-substitute-on-destination
- Install
nix
with the Determinate installer xcode-select --install
to makegit
available- Bootstrap SSH credentials
- Clone this repo and enter its devShell
darwin-rebuild switch --flake .#<hostname>
chsh -s /run/current-system/sw/bin/fish
On non-NixOS, use the Determinate nix
installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix repl
# in the resulting nix prompt
> :lf .
Enable/disable auto-snapshot with the following command:
sudo zfs set com.sun:auto-snapshot=true <pool>/<fs>
maestral auth link # follow instruction
mkdir -p ~/sync/dropbox
maestral config set path ~/sync/dropbox
# common excludes
maestral excluded add /audios
maestral excluded add /backup
maestral excluded add /git
maestral excluded add /researches/lhcb-hardware_related
maestral excluded add /videos
- This project was originally based on
digga
. digga
is no longer actively maintained. To learnnix
and make things simpler, I studiedlite-config
flake, stole the bits useful to me, and remade the project into its current state.