diff --git a/collect-network-connections.sh b/collect-network-connections.sh deleted file mode 100644 index 4d3d8d3..0000000 --- a/collect-network-connections.sh +++ /dev/null @@ -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 diff --git a/flake.nix b/flake.nix index 228f921..85bbfd1 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,13 @@ writeCommand = krops.packages.${system}.writeCommand; 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" '' echo "push network passwords to $1"