upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2023-12-06 08:14:53 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2023-12-06 08:14:53 +0000
commitf811835ca768d6cbcef24f2873c43b51e63578ce (patch)
tree4da458f43d90d2b385102c008f0f6f9587d144b6
parent7392a20a3e38b4030b27761a3cffee64484695e7 (diff)
build(deps) update nix
- update nix flake - bump hard coded reference to rustfmt nightly version - fix warning that latest version of rustfmt produced
-rw-r--r--flake.lock18
-rw-r--r--flake.nix2
-rw-r--r--src/key_handling/users.rs3
3 files changed, 11 insertions, 12 deletions
diff --git a/flake.lock b/flake.lock
index 29425ed..6bec3de 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
5 "systems": "systems" 5 "systems": "systems"
6 }, 6 },
7 "locked": { 7 "locked": {
8 "lastModified": 1692799911, 8 "lastModified": 1701680307,
9 "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", 9 "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
10 "owner": "numtide", 10 "owner": "numtide",
11 "repo": "flake-utils", 11 "repo": "flake-utils",
12 "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", 12 "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
13 "type": "github" 13 "type": "github"
14 }, 14 },
15 "original": { 15 "original": {
@@ -38,11 +38,11 @@
38 }, 38 },
39 "nixpkgs": { 39 "nixpkgs": {
40 "locked": { 40 "locked": {
41 "lastModified": 1694183432, 41 "lastModified": 1701436327,
42 "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", 42 "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
43 "owner": "NixOS", 43 "owner": "NixOS",
44 "repo": "nixpkgs", 44 "repo": "nixpkgs",
45 "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", 45 "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
46 "type": "github" 46 "type": "github"
47 }, 47 },
48 "original": { 48 "original": {
@@ -81,11 +81,11 @@
81 "nixpkgs": "nixpkgs_2" 81 "nixpkgs": "nixpkgs_2"
82 }, 82 },
83 "locked": { 83 "locked": {
84 "lastModified": 1694398298, 84 "lastModified": 1701829002,
85 "narHash": "sha256-Hi904+2V5DJhFdEy9DcARSRrGJOlYSILHUC6CgTtuZU=", 85 "narHash": "sha256-zUQTSNujRESm2s0SvL4EXx1l5BqX7VNDAaFWGnaylUY=",
86 "owner": "oxalica", 86 "owner": "oxalica",
87 "repo": "rust-overlay", 87 "repo": "rust-overlay",
88 "rev": "6c520f2e31f4bebeb29cc4563543de7187013575", 88 "rev": "1fdfc1689218998460983986501bd65ba5bbee0f",
89 "type": "github" 89 "type": "github"
90 }, 90 },
91 "original": { 91 "original": {
diff --git a/flake.nix b/flake.nix
index d527e36..26fda20 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,7 +22,7 @@
22 # ideally this wouldn't be pinned to a specific nightly version but 22 # ideally this wouldn't be pinned to a specific nightly version but
23 # selectLatestNightlyWith isn't support with mixed toolchains 23 # selectLatestNightlyWith isn't support with mixed toolchains
24 # https://github.com/oxalica/rust-overlay/issues/136 24 # https://github.com/oxalica/rust-overlay/issues/136
25 (lib.hiPrio rust-bin.nightly."2023-09-01".rustfmt) 25 (lib.hiPrio rust-bin.nightly."2023-12-01".rustfmt)
26 # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; }) 26 # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; })
27 rust-bin.stable.latest.default 27 rust-bin.stable.latest.default
28 ]; 28 ];
diff --git a/src/key_handling/users.rs b/src/key_handling/users.rs
index 75a0a00..42104f7 100644
--- a/src/key_handling/users.rs
+++ b/src/key_handling/users.rs
@@ -103,8 +103,7 @@ impl UserManagement for UserManager {
103 encrypted_secret_key: Option<String>, 103 encrypted_secret_key: Option<String>,
104 overwrite: bool, 104 overwrite: bool,
105 ) -> Result<()> { 105 ) -> Result<()> {
106 let user_ref = 106 let user_ref = config::UserRef::new(public_key, encrypted_secret_key.unwrap_or_default());
107 config::UserRef::new(public_key, encrypted_secret_key.unwrap_or(String::new()));
108 107
109 let mut cfg = self.config_manager.load().context("failed to load application config to find and remove any old versions of the user's encrypted key")?; 108 let mut cfg = self.config_manager.load().context("failed to load application config to find and remove any old versions of the user's encrypted key")?;
110 // don't overwrite unless specified 109 // don't overwrite unless specified