fix(impermanence): copy over to persist when deploying
This commit is contained in:
parent
9ee5317e6a
commit
03abee8b66
2 changed files with 17 additions and 0 deletions
|
@ -105,6 +105,21 @@
|
|||
# Directories to persist between boots
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
environment.persistence."/persist" = {
|
||||
# Hide the mounts from showing up in the file manager.
|
||||
hideMounts = true;
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/machine-id"
|
||||
];
|
||||
users.rafiq = {
|
||||
directories = [
|
||||
"repos"
|
||||
];
|
||||
files = [
|
||||
".config/sops/age/keys.txt"
|
||||
".ssh/id_ed25519"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ done
|
|||
|
||||
# Prepare temporary directory and copy necessary files
|
||||
root=$(mktemp -d)
|
||||
mkdir -p ${root}/persist
|
||||
root=${root}/persist
|
||||
sudo cp --verbose --archive --parents /etc/ssh/ssh_host_* ${root}
|
||||
sudo cp --verbose --archive --parents ~/.ssh/id_ed25519 ${root}
|
||||
sudo cp --verbose --archive --parents ~/.config/sops/age/keys.txt ${root}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue