But not today
Anyway, this is my nix config, a bit messy, but functionnal enough for me !
# Install Nix using lix installer
curl -sSf -L https://install.lix.systems/lix | sh -s -- install macos --volume-label <volume name>
# Recommended prerequisites
xcode-select --install
softwareupdate --install-rosetta --agree-to-license
sudo xcodebuild -license accept # Once Xcode is installed
# Install sops age key from ssh-id
nix-shell -p ssh-to-age --run "ssh-to-age -private-key -i <path to ssh id> > <path to sops key>"
# Rebuild config without darwin-rebuild cmd
export SOPS_KEY_FILE=<path to sops key> # Needed for secrets decrypt
sudo --preserve-env=SOPS_KEY_FILE nix run nix-darwin/master#darwin-rebuild \
--extra-experimental-features nix-command --extra-experimental-features flakes -- switch \
--flake <path>#<configName> \
--impure
# Recommended
sudo rebootSecrets editing
# Get public key
nix-shell -p age --run "age-keygen -y <path to sops key>"
# Edit secrets
export SOPS_AGE_KEY_FILE=<path to file with keys>
nix-shell -p sops --run "sops <secrets path>"
# Update keys from .sops.yaml
nix-shell -p sops --run "sops updatekeys <secrets path>"EnclosureNumbers colors:
| Int | Hex | Color |
|---|---|---|
| -2 | multicolor | |
| -1 | #8C8C8C |
|
| 0 | #F04F55 |
|
| 1 | #F7821B |
|
| 2 | #FFC600 |
|
| 3 | #62BA46 |
|
| 4 | #007AFF |
|
| 5 | #A550A7 |
|
| 6 | #F74F9E |
|
| 9 | #F3B036 |
|
| 10 | #427E82 |
|
| 11 | #507790 |
|
| 12 | #CD565A |
|
| 13 | #5D6291 |
|
| 14 | #EF8056 |
|
| 15 | #98A8D9 |
|
| 16 | #B5D65A |
|
| 16 | #F77F9A |