nixos/goldwarden,goldwarden: drop

The software is abandoned upstream and does not work with new Bitwarden
server versions.
This commit is contained in:
dish
2025-09-16 15:05:19 -04:00
parent 674dc90009
commit a311993b7f
6 changed files with 7 additions and 168 deletions

View File

@@ -162,6 +162,8 @@
- Configurations with `boot.initrd.systend.enable && !boot.initrd.enable` will have their `init` script at `$toplevel/init` instead of `$toplevel/prepare-root`. This is because it does not make sense for systemd stage 1 to affect the `init` script when stage 1 is entirely disabled (e.g. containers).
- `programs.goldwarden` has been removed, due to the software not working with newer versions of the Bitwarden and Vaultwarden servers, as well as it being abandoned upstream.
- `Prosody` has been updated to major release 13 which removed some obsoleted modules and brought a couple of major and breaking changes:
- The `http_files` module is now disabled by default because it now requires `http_files_dir` to be configured.
- The `vcard_muc` module has been removed and got replaced by the inbuilt `muc_vcard` module.

View File

@@ -228,7 +228,6 @@
./programs/gnome-disks.nix
./programs/gnome-terminal.nix
./programs/gnupg.nix
./programs/goldwarden.nix
./programs/gpaste.nix
./programs/gphoto2.nix
./programs/gpu-screen-recorder.nix

View File

@@ -1,61 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.programs.goldwarden;
in
{
options.programs.goldwarden = {
enable = lib.mkEnableOption "Goldwarden";
package = lib.mkPackageOption pkgs "goldwarden" { };
useSshAgent = lib.mkEnableOption "Goldwarden's SSH Agent" // {
default = true;
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.useSshAgent -> !config.programs.ssh.startAgent;
message = "Only one ssh-agent can be used at a time.";
}
];
environment = {
etc = lib.mkIf config.programs.chromium.enable {
"chromium/native-messaging-hosts/com.8bit.bitwarden.json".source =
"${cfg.package}/etc/chromium/native-messaging-hosts/com.8bit.bitwarden.json";
"opt/chrome/native-messaging-hosts/com.8bit.bitwarden.json".source =
"${cfg.package}/etc/chrome/native-messaging-hosts/com.8bit.bitwarden.json";
};
extraInit = lib.mkIf cfg.useSshAgent ''
if [ -z "$SSH_AUTH_SOCK" -a -n "$HOME" ]; then
export SSH_AUTH_SOCK="$HOME/.goldwarden-ssh-agent.sock"
fi
'';
systemPackages = [
# for cli and polkit action
cfg.package
# binary exec's into pinentry which should match the DE
config.programs.gnupg.agent.pinentryPackage
];
};
programs.firefox.nativeMessagingHosts.packages = [ cfg.package ];
# see https://github.com/quexten/goldwarden/blob/main/cmd/goldwarden.service
systemd.user.services.goldwarden = {
description = "Goldwarden daemon";
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig.ExecStart = "${lib.getExe cfg.package} daemonize";
path = [ config.programs.gnupg.agent.pinentryPackage ];
unitConfig.ConditionUser = "!@system";
};
};
}

View File

@@ -62,6 +62,10 @@ in
"programs"
"gnome-documents"
] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [
"programs"
"goldwarden"
] "'goldwarden' has been removed from nixpkgs.")
(mkRemovedOptionModule [ "programs" "pantheon-tweaks" ] ''
pantheon-tweaks is no longer a switchboard plugin but an independent app,
adding the package to environment.systemPackages is sufficient.

View File

@@ -1,106 +0,0 @@
{
lib,
blueprint-compiler,
buildGoModule,
fetchFromGitHub,
gobject-introspection,
gtk4,
libadwaita,
libfido2,
libnotify,
python3,
wrapGAppsHook4,
}:
buildGoModule rec {
pname = "goldwarden";
version = "0.3.6";
src = fetchFromGitHub {
owner = "quexten";
repo = "goldwarden";
rev = "v${version}";
hash = "sha256-wAQFx0DKLLKztETAz1eM+eBFiAkSCgd8qqRtLV1Kz9g=";
};
postPatch = ''
substituteInPlace gui/src/{linux/main.py,linux/monitors/dbus_monitor.py,gui/settings.py} \
--replace-fail "python3" "${(python3.buildEnv.override { extraLibs = pythonPath; }).interpreter}"
substituteInPlace gui/com.quexten.Goldwarden.desktop \
--replace-fail "Exec=goldwarden_ui_main.py" "Exec=$out/bin/goldwarden-gui"
substituteInPlace gui/src/gui/resources/commands.json \
--replace-fail "flatpak run --filesystem=home --command=goldwarden com.quexten.Goldwarden" "goldwarden" \
--replace-fail "flatpak run --command=goldwarden com.quexten.Goldwarden" "goldwarden" \
--replace-fail 'SSH_AUTH_SOCK=/home/$USER/.var/app/com.quexten.Goldwarden/data/ssh-auth-sock' 'SSH_AUTH_SOCK=/home/$USER/.goldwarden-ssh-agent.sock'
substituteInPlace cli/browserbiometrics/chrome-com.8bit.bitwarden.json cli/browserbiometrics/mozilla-com.8bit.bitwarden.json \
--replace-fail "@PATH@" "$out/bin/goldwarden"
'';
vendorHash = "sha256-zWACjW/WZC0ZLmRV1VwcRROG218PCZ6aCPOreCG/5sE=";
ldflags = [
"-s"
"-w"
];
nativeBuildInputs = [
blueprint-compiler
gobject-introspection
python3.pkgs.wrapPython
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
libfido2
libnotify
];
pythonPath = with python3.pkgs; [
dbus-python
pygobject3
tendo
];
postInstall = ''
blueprint-compiler batch-compile gui/src/gui/.templates/ gui/src/gui/ gui/src/gui/*.blp
chmod +x gui/goldwarden_ui_main.py
mkdir -p $out/share/goldwarden
cp -r gui/* $out/share/goldwarden/
ln -s $out/share/goldwarden/goldwarden_ui_main.py $out/bin/goldwarden-gui
rm $out/share/goldwarden/{com.quexten.Goldwarden.desktop,com.quexten.Goldwarden.metainfo.xml,com.quexten.Goldwarden.svg,python3-requirements.json,requirements.txt}
install -D gui/com.quexten.Goldwarden.desktop -t $out/share/applications
install -D gui/com.quexten.Goldwarden.svg -t $out/share/icons/hicolor/scalable/apps
install -Dm644 gui/com.quexten.Goldwarden.metainfo.xml -t $out/share/metainfo
install -Dm644 cli/resources/com.quexten.goldwarden.policy -t $out/share/polkit-1/actions
install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/chrome/native-messaging-hosts/com.8bit.bitwarden.json
install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/chromium/native-messaging-hosts/com.8bit.bitwarden.json
install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/edge/native-messaging-hosts/com.8bit.bitwarden.json
install -D cli/browserbiometrics/mozilla-com.8bit.bitwarden.json $out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.json
'';
dontWrapGApps = true;
postFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn $out/share/goldwarden "$out/share/goldwarden $pythonPath"
'';
meta = with lib; {
description = "Feature-packed Bitwarden compatible desktop integration";
homepage = "https://github.com/quexten/goldwarden";
license = licenses.mit;
maintainers = with maintainers; [
arthsmn
justanotherariel
];
mainProgram = "goldwarden";
platforms = platforms.linux; # Support for other platforms is not yet ready, see https://github.com/quexten/goldwarden/issues/4
};
}

View File

@@ -1094,6 +1094,7 @@ mapAliases {
godot-export-templates = lib.warnOnInstantiate "godot-export-templates has been renamed to godot-export-templates-bin" godot-export-templates-bin; # Added 2025-03-27
go-thumbnailer = thud; # Added 2023-09-21
go-upower-notify = upower-notify; # Added 2024-07-21
goldwarden = throw "'goldwarden' has been removed, as it no longer works with new Bitwarden versions and is abandoned upstream"; # Added 2025-09-16
googler = throw "'googler' has been removed, as it no longer works and is abandoned upstream"; # Added 2025-04-01
gpicview = throw "'gpicview' has been removed due to lack of maintenance upstream and depending on gtk2. Consider using 'loupe', 'gthumb' or 'image-roll' instead"; # Added 2024-09-15
gprbuild-boot = gnatPackages.gprbuild-boot; # Added 2024-02-25;