Fix installation bugs
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -56,7 +56,7 @@ setup_wifi() {
|
||||
|
||||
select_host() {
|
||||
echo "Available hosts:"
|
||||
echo $(nix flake show --json | nix shell nixpkgs#jq --command jq -r '.nixosConfigurations | keys[]')
|
||||
echo $(nix --experimental-features "nix-command flakes" flake show --json | nix --experimental-features "nix-command flakes" shell nixpkgs#jq --command jq -r '.nixosConfigurations | keys[]')
|
||||
|
||||
echo "Enter host:"
|
||||
read -r host
|
||||
@@ -81,8 +81,13 @@ copy_keys() {
|
||||
cp "./hosts/${host}/secrets/ssh_host_ed25519_key" /mnt/persist/etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
for user in "${users[@]}"; do
|
||||
mkdir -p "/mnt/persist/home/${user}/.local/share/sops-nix"
|
||||
cp "./users/${user}/secrets/key.txt" "/mnt/persist/home/${user}/.local/share/sops-nix/key.txt"
|
||||
mkdir -p "/mnt/persist/home/${user}/.config/sops-nix"
|
||||
cp "./users/${user}/secrets/key.txt" "/mnt/persist/home/${user}/.config/sops-nix/key.txt"
|
||||
|
||||
uid=$(cat "./users/${user}/uid")
|
||||
gid=100
|
||||
|
||||
chown -R "${uid}:${gid}" "/mnt/persist/home/${user}"
|
||||
done
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user