No description
- Nix 72%
- Shell 13.7%
- Python 8.5%
- Just 4.6%
- CSS 1.2%
| .cursor/rules | ||
| .vscode | ||
| hooks | ||
| hosts | ||
| lib | ||
| modules | ||
| pkgs | ||
| scripts | ||
| secrets | ||
| secrets_plain | ||
| .gitignore | ||
| .sops.yaml | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| README.md | ||
Secrets workflow with just
This repository includes helper targets for encrypting and decrypting YAML secrets with sops.
Directories
- Plain (decrypted) files:
secrets_plain/ - Encrypted files:
secrets/
Targets
just encrypt [filename]- Encrypts all
*.yaml/*.ymlfromsecrets_plain/intosecrets/. - If
filenameis provided, encrypts only that file.
- Encrypts all
just decrypt [filename]- Requires
sudobecause the SOPS Age key is stored in/var/lib/sops-nix/key.age. - Decrypts all
*.yaml/*.ymlfromsecrets/intosecrets_plain/. - If
filenameis provided, decrypts only that file.
- Requires
just sync- Copies mutable desktop config state from
~/.configback into tracked files undermodules/desktop/dms/. - Intended for persisting runtime changes to mutable config files back into the NixOS configuration in this repo.
- Copies mutable desktop config state from
filename can be passed either with extension (singbox.yaml) or without (singbox).
Examples
Encrypt everything:
just encrypt
Decrypt everything:
sudo just decrypt
Encrypt only one file:
just encrypt singbox
just encrypt singbox.yaml
Decrypt only one file:
sudo just decrypt singbox
sudo just decrypt singbox.yaml
Sync mutable desktop config back into this repo:
just sync
Nix Tooling
nixdis installed viamodules/nix-goodies.nixand available system-wide after rebuild.- Workspace editor integration is configured in this repo:
- Extension recommendation:
.vscode/extensions.json(jnoortheen.nix-ide) - Language server settings:
.vscode/settings.json(usesnixdandnixfmt)
- Extension recommendation:
Git Hooks
- This repo includes a versioned pre-commit hook at
hooks/pre-commit. - Install it in a clone with:
just install-hooks
- The hook runs
just formatand blocks the commit if any staged.nixfile was reformatted, so you can re-stage and commit again.
Deploy to a remote nixos machine (e.g another laptop)
sudo nixos-rebuild --flake ~/nixos/.#pavel-asus switch --target-host user@host --build-host user@host --sudo --ask-sudo-password