This commit is contained in:
Ingolf Wagner 2022-06-23 01:03:37 +02:00
parent a5209c41f3
commit a085c8d3e5
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 7 additions and 11 deletions

View file

@ -1,10 +0,0 @@
#!/usr/bin/env bash
# collect all network configurations and save them in the store
sudo ls /etc/NetworkManager/system-connections \
| while read file
do
sudo cat "/etc/NetworkManager/system-connections/$file" \
| pass insert -m "krops/desktop_secrets/network-manager/system-connections/$file"
done

View file

@ -78,7 +78,13 @@
writeCommand = krops.packages.${system}.writeCommand; writeCommand = krops.packages.${system}.writeCommand;
pullNetworkPasswords = pkgs.writers.writeBashBin "pull-network-passwords" '' pullNetworkPasswords = pkgs.writers.writeBashBin "pull-network-passwords" ''
echo "download network passwords from $1" # collect all network configurations and save them in the store
sudo ls /etc/NetworkManager/system-connections \
| while read file
do
sudo cat "/etc/NetworkManager/system-connections/$file" \
| ${pkgs.pass}/bin/pass insert -m "krops/desktop_secrets/network-manager/system-connections/$file"
done
''; '';
pushNetworkPasswords = pkgs.writers.writeBashBin "push-network-passwords" '' pushNetworkPasswords = pkgs.writers.writeBashBin "push-network-passwords" ''
echo "push network passwords to $1" echo "push network passwords to $1"