Nix Cache
[!quote]
- Upgrade NixOS through private cache proxy :: Tweak Loop — Tweaking make big things!
- Setting up a private Nix cache for fun and profit
- Welcome to Cachix documentation — documentation
- cachix/install-nix-action
Cachix
备份 flake input
推送 nix build
nix build --json \
| jq -r '.[].outputs | to_entries[].value' \
| cachix push 3waffel
推送 nix develop
nix develop --profile dev-profile
cachix push mycache dev-profile
从 cachix 获取指定包,确保当前用户已加入 trusted-users
nix-shell -p <package> --option substituters "https://3waffel.cachix.org"
推送指定 drv
nix-store -qR --include-outputs /nix/store/<package>.drv | cachix push 3waffel
手动推送 nixos 配置
nix build --no-link --print-out-paths .#nixosConfigurations.<name>.config.system.build.toplevel | cachix push 3waffel
手动推送 home-manager 配置
nix build --no-link --print-out-paths .#homeConfigurations.<name>.activationPackage | cachix push 3waffel