From 4f5b1c61af838d29f1f80b493160a28d0866d277 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 8 Jan 2022 00:58:14 +0100 Subject: ... --- files/files/etc/config/wireless | 6 +++--- flake.nix | 9 +++++++-- patches/wifi-passphrases.sops | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 patches/wifi-passphrases.sops diff --git a/files/files/etc/config/wireless b/files/files/etc/config/wireless index e6192bc..a548c26 100644 --- a/files/files/etc/config/wireless +++ b/files/files/etc/config/wireless @@ -20,7 +20,7 @@ config wifi-iface 'default_radio0' option pmk_r1_push '1' config wifi-iface 'dmz01_radio0' - option device 'radio2' + option device 'radio0' option network 'dmz01' option mode 'ap' option key '' @@ -54,10 +54,10 @@ config wifi-iface 'default_radio1' option pmk_r1_push '1' config wifi-iface 'dmz01_radio1' - option device 'radio3' + option device 'radio1' option network 'dmz01' option mode 'ap' - option ssid 'teslo' + option ssid 'tesla' option encryption 'psk2+ccmp' option key '' option ieee80211r '1' diff --git a/flake.nix b/flake.nix index 2f5758a..237d7e9 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ pkgconfig ubnt-mkfwimage + gnused ]; openwrtWithPackages = pkgs.stdenv.mkDerivation { @@ -164,8 +165,12 @@ done < <(find . "$patchDir" -not \( \( -path ./tmp -o -path ./build_dir -o -path ./bin -o -path ./staging_dir \) -a -prune \) -a \( -type f -a -name '*.sops' -a -print0 \)) while IFS= read -r -d $'\0' patchFile; do - patch -p1 --batch <$patchFile - done < <(find "$patchDir" -type f -name '*.patch' -print0) + if [[ "''${patchFile##*.}" = "patch" ]]; then + patch -p1 --batch <$patchFile + else + . $patchFile + fi + done < <(find "$patchDir" -type f -print0) } function buildPhase() { diff --git a/patches/wifi-passphrases.sops b/patches/wifi-passphrases.sops new file mode 100644 index 0000000..8a1ec85 --- /dev/null +++ b/patches/wifi-passphrases.sops @@ -0,0 +1,21 @@ +{ + "data": "ENC[AES256_GCM,data:4lzSBetxQJQC/DKpfeozY66HauRwgmsSqrsPuaph4UVGAU/cr5LsZSkTO6QYcWcuWasCy8//1xM1tP9AQNaifFU4xYxcqn4NHPCLJlw3wR+gCaZ7ggbkXIUjcNI4UbA368ksRsrIEhFWEx7h26kQn7sqLpheBApkL3/8LKyA0A7OGJIrUSxeDbaOnG8kklQjLNzEhSvxWVWv,iv:jCrd+rbg9akUFVw+GYMr/KU0wMvfvpX/dT51zrxdeYQ=,tag:lg0MKi/vYnmDWYNANj38QA==,type:str]", + "sops": { + "kms": null, + "gcp_kms": null, + "azure_kv": null, + "hc_vault": null, + "age": null, + "lastmodified": "2022-01-07T23:55:55Z", + "mac": "ENC[AES256_GCM,data:7thcVQOenGhqETjyu+49NQFehhXJfKLReQZwHJzHCCB9TykosU4vXml5KA5sW9jY3jnvcbwvW7Og7q4s7Vpb3+1eSh9m8W/Eqkb/InEeC57y9RYl8rlegmuynCOmo1pVJDJSM3N+fiqlsneg3hCYUgAWam/NG0tfsq1eNNNSMIA=,iv:iUNx6rnFIeZET7v25QGuy960yQ7VYO7jyj1dlt/Tt2s=,tag:0VxPKHELmL8zwTwC70kZVA==,type:str]", + "pgp": [ + { + "created_at": "2022-01-07T23:55:55Z", + "enc": "-----BEGIN PGP MESSAGE-----\n\nhF4DXxoViZlp6dISAQdA3vMhLweSNx8NpOc5InJC4mSvrvoL2+BdWWo8bl/2Yl8w\nnBGAv0COfBA8CaH4LINa38L/HCq2p+7zm1oTvgmXhYQH4UFz5+zDi4XtTpNSY7a1\n0lwB2mPBl1omUMmGYTwLq7lTjFNDCphdYa/5fwYr2yL8WW4VTgmeXkuY7ExzCtSU\n2gcJtnXSweOotnq9Lp5erjKmlozDRcCiXdkmKywe14EZGj3lrhCBfpNKXoNxDA==\n=N6Hw\n-----END PGP MESSAGE-----\n", + "fp": "30D3453B8CD02FE2A3E7C78C0FB536FB87AE8F51" + } + ], + "unencrypted_suffix": "_unencrypted", + "version": "3.7.1" + } +} \ No newline at end of file -- cgit v1.2.3