Binary Cache: Difference between revisions

imported>Nomeata
nix path-info
imported>Milahu
make shell code simpler
Line 7: Line 7:
=== 1. Generating a private/public keypair ===
=== 1. Generating a private/public keypair ===


A keypair is necessary to sign Nix packages.  
A keypair is necessary to sign Nix packages. Replace <code>binarycache.example.com</code> with your domain.


{{bc|
{{bc|
$ nix-store --generate-binary-cache-key binarycache.example.com cache-priv-key.pem cache-pub-key.pem
cd /var
# mv cache-priv-key.pem /var/cache-priv-key.pem
nix-store --generate-binary-cache-key binarycache.example.com cache-priv-key.pem cache-pub-key.pem
# chown nix-serve /var/cache-priv-key.pem
chown nix-serve cache-priv-key.pem
# chmod 600 /var/cache-priv-key.pem
chmod 600 cache-priv-key.pem
cat cache-pub-key.pem
}}
}}