Unverified Commit 410019be authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 503801f5 d6411ed8
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -6801,6 +6801,15 @@
    githubId = 21362942;
    name = "Fugi";
  };
  funkeleinhorn = {
    email = "git@funkeleinhorn.com";
    github = "funkeleinhorn";
    githubId = 103313934;
    name = "Funkeleinhorn";
    keys = [{
      fingerprint = "689D 1C81 DA0D 1EB2 F029  D24E C7BE A25A 0A33 5A72";
    }];
  };
  fusion809 = {
    email = "brentonhorne77@gmail.com";
    github = "fusion809";
@@ -7465,6 +7474,13 @@
    githubId = 201997;
    name = "Eric Seidel";
  };
  grimmauld = {
    name = "Sören Bender";
    email = "soeren@benjos.de";
    github = "LordGrimmauld";
    githubId = 49513131;
    matrix = "@grimmauld:grimmauld.de";
  };
  grindhold = {
    name = "grindhold";
    email = "grindhold+nix@skarphed.org";
@@ -8678,6 +8694,12 @@
    github = "j4m3s-s";
    githubId = 9413812;
  };
  jab = {
    name = "Joshua Bronson";
    email = "jabronson@gmail.com";
    github = "jab";
    githubId = 64992;
  };
  jacbart = {
    name = "Jack Bartlett";
    email = "jacbart@gmail.com";
@@ -11515,6 +11537,15 @@
    githubId = 3717454;
    name = "Lucas Bergman";
  };
  lucas-deangelis = {
    email = "deangelis.lucas@outlook.com";
    github = "lucas-deangelis";
    githubId = 55180995;
    name = "Lucas De Angelis";
    keys = [{
      fingerprint = "3C8B D3AD 93BB 1F36 B8FF  30BD 8627 E5ED F74B 5BF4";
    }];
  };
  lucasew = {
    email = "lucas59356@gmail.com";
    github = "lucasew";
@@ -12513,6 +12544,12 @@
      fingerprint = "D709 03C8 0BE9 ACDC 14F0  3BFB 77BF E531 397E DE94";
    }];
  };
  mdorman = {
    email = "mdorman@jaunder.io";
    github = "mdorman";
    githubId = 333344;
    name = "Michael Alan Dorman";
  };
  mdr = {
    email = "MattRussellUK@gmail.com";
    github = "mdr";
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@
  ./programs/gnome-disks.nix
  ./programs/gnome-terminal.nix
  ./programs/gnupg.nix
  ./programs/goldwarden.nix
  ./programs/gpaste.nix
  ./programs/gphoto2.nix
  ./programs/haguichi.nix
+50 −0
Original line number Diff line number Diff line
{ 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";
    };
  };
}
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ in
      };

      implicitPolicyTarget = mkOption {
        type = policy;
        type = types.enum [ "allow" "block" "reject" ];
        default = "block";
        description = lib.mdDoc ''
          How to treat USB devices that don't match any rule in the policy.
@@ -110,7 +110,7 @@ in
      };

      insertedDevicePolicy = mkOption {
        type = policy;
        type = types.enum [ "block" "reject" "apply-policy" ];
        default = "apply-policy";
        description = lib.mdDoc ''
          How to treat USB devices that are already connected after the daemon
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ in
  };

  options.services.pretix = {
    enable = mkEnableOption "pretix";
    enable = mkEnableOption "Pretix, a ticket shop application for conferences, festivals, concerts, etc.";

    package = mkPackageOption pkgs "pretix" { };

Loading