diff --git a/overlay/bitwarden/default.nix b/overlay/bitwarden/default.nix new file mode 100644 index 0000000..bcbabea --- /dev/null +++ b/overlay/bitwarden/default.nix @@ -0,0 +1,7 @@ +final: prev: { + bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (finalAttrs: prevAttrs: { + patches = prevAttrs.patches ++ [ + ./ssh-agent-no-confirm.patch + ]; + }); +} \ No newline at end of file diff --git a/overlay/bitwarden/ssh-agent-no-confirm.patch b/overlay/bitwarden/ssh-agent-no-confirm.patch new file mode 100644 index 0000000..3e8e023 --- /dev/null +++ b/overlay/bitwarden/ssh-agent-no-confirm.patch @@ -0,0 +1,34 @@ +diff --git a/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs b/core/src/ssh_agent/mod.rs +index 4e304cc..8203dca 100644 +--- a/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs ++++ b/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs +@@ -44,28 +44,7 @@ impl ssh_agent::Agent for BitwardenDesktopAgent { + return false; + } + +- let request_id = self.get_request_id().await; +- println!( +- "[SSH Agent] Confirming request from application: {}", +- info.process_name() +- ); +- +- let mut rx_channel = self.get_ui_response_rx.lock().await.resubscribe(); +- self.show_ui_request_tx +- .send(SshAgentUIRequest { +- request_id, +- cipher_id: Some(ssh_key.cipher_uuid.clone()), +- process_name: info.process_name().to_string(), +- is_list: false, +- }) +- .await +- .expect("Should send request to ui"); +- while let Ok((id, response)) = rx_channel.recv().await { +- if id == request_id { +- return response; +- } +- } +- false ++ true + } + + async fn can_list(&self, info: &peerinfo::models::PeerInfo) -> bool { diff --git a/overlay/conduwuit/default.nix b/overlay/conduwuit/default.nix deleted file mode 100644 index 1222c83..0000000 --- a/overlay/conduwuit/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -final: prev: -let - newRust = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - newRustPlatform = final.makeRustPlatform { - cargo = newRust; - rustc = newRust; - }; -in -{ - conduwuit = prev.conduwuit.override (old: { - rustPlatform = newRustPlatform // { - buildRustPackage = - args: - newRustPlatform.buildRustPackage ( - args - // { - version = "0.5.0-rc2"; - src = final.fetchFromGitHub { - owner = "girlbossceo"; - repo = "conduwuit"; - rev = "5b8464252c2c03edf65e43153be026dbb768a12a"; - hash = "sha256-yNdxoVZX13QUDJYM6zTMY9ExvacTqB+f0MLvDreSW8U="; - }; - doCheck = false; - cargoHash = "sha256-g19UujLI9d4aw+1273gfC17LDLOciqBvuLhe/VCsh80="; - # unstable has this set to "conduit" - meta.mainProgram = "conduwuit"; - - buildFeatures = [ - "brotli_compression" - "element_hacks" - "gzip_compression" - "release_max_log_level" # without this feature to enable debug logging - "sentry_telemetry" - "systemd" - "zstd_compression" - "jemalloc" - "io_uring" - ]; - } - ); - }; - }); -} diff --git a/overlay/conduwuit/rust-toolchain.toml b/overlay/conduwuit/rust-toolchain.toml deleted file mode 100644 index 97e33c9..0000000 --- a/overlay/conduwuit/rust-toolchain.toml +++ /dev/null @@ -1,28 +0,0 @@ -# This is the authoritiative configuration of this project's Rust toolchain. -# -# Other files that need upkeep when this changes: -# -# * `Cargo.toml` -# * `flake.nix` -# -# Search in those files for `rust-toolchain.toml` to find the relevant places. -# If you're having trouble making the relevant changes, bug a maintainer. - -[toolchain] -channel = "1.84.0" -profile = "minimal" -components = [ - # For rust-analyzer - "rust-src", - "rust-analyzer", - # For CI and editors - "rustfmt", - "clippy", -] -targets = [ - #"x86_64-apple-darwin", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "aarch64-unknown-linux-musl", - #"aarch64-apple-darwin", -] diff --git a/overlay/default.nix b/overlay/default.nix index d617b17..6d60897 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -3,6 +3,7 @@ let overlays = [ ./attic ./zipline + ./bitwarden ]; importedOverlays = map (m: import m) overlays; in @@ -12,12 +13,11 @@ importedOverlays final: prev: let nixpkgsFrom = flake: pkg: flake.legacyPackages.${prev.system}.${pkg}; - pkgFrom = flake: pkgFrom' flake "default"; - pkgFrom' = flake: pkg: flake.packages.${prev.system}.${pkg}; + pkgFrom = flake: pkg: flake.packages.${prev.system}.${pkg}; in { conduwuit = - pkgFrom' inputs.conduwuit "static-x86_64-linux-musl-all-features-x86_64-haswell-optimised"; + pkgFrom inputs.conduwuit "static-x86_64-linux-musl-all-features-x86_64-haswell-optimised"; pixelflasher = nixpkgsFrom inputs.pixelflasher "pixelflasher"; } )