From a085c8d3e5183c5a8947072932569e6ba0dccb54 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 23 Jun 2022 01:03:37 +0200 Subject: [PATCH] cleanup --- collect-network-connections.sh | 10 ---------- flake.nix | 8 +++++++- 2 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 collect-network-connections.sh 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"