24 lines
588 B
Bash
Executable File
24 lines
588 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
temp=$(mktemp -d)
|
|
|
|
cleanup() {
|
|
rm -rf "$temp"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
install -d -m 755 "$temp/etc/ssh"
|
|
cp ./submodules/secrets/hosts/elara/ssh_host_ed25519_key "$temp/etc/ssh/ssh_host_ed25519_key"
|
|
|
|
install -d -m 700 "$temp/home/nikara"
|
|
install -d -m 755 "$temp/home/nikara/.config/sops-nix"
|
|
cp ./submodules/secrets/domains/sas/key.txt "$temp/home/nikara/.config/sops-nix/key.txt"
|
|
|
|
sudo nix run .#nixosConfigurations.elara.config.system.build.tarballBuilder -- \
|
|
--extra-files "$temp" \
|
|
--chown /home/nikara 1000:100
|