]>
Git — Sourcephile - sourcephile-nix.git/blob - private/hosts/encrypt.sh
8 mkdir -p "$dir/$host/credentials/${hostkey%/*}"
10 sudo unshare
--mount sh
-xc "
11 mount --bind $dir/$host/root/credential.secret /var/lib/systemd/credential.secret &&
12 mount --bind $dir/$host/root/machine-id /etc/machine-id &&
13 systemd-creds encrypt --with-key=host --name '${hostkey##*/}' - - |
14 install -m 400 -o $USER -g users /dev/stdin '$dir/$host/credentials/$hostkey.secret'