aboutsummaryrefslogtreecommitdiffstats
path: root/modules/security/enteauth/default.nix
blob: d2c8a1dde162e956351718d7fef84e1e84985626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Ente Auth - end-to-end encrypted authentication (2FA)
{
  config,
  lib,
  pkgs,
  ...
}:
{
  options.security.enteauth = {
    enable = lib.mkEnableOption "Enables wrapped ente-auth with automated keyring unlocks and a desktop entry.";
    package = lib.mkOption {
      type = lib.types.package;
      default = pkgs.ente-auth;
      description = "The customized version of ente-auth with a self-unlocking daemon backend.";
    };
  };

  config = lib.mkIf config.security.enteauth.enable {
    home.packages = [ config.security.enteauth.package ];

    xdg.mimeApps.defaultApplications = {
      "x-scheme-handler/enteauth" = "enteauth.desktop";
    };
  };
}