diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-07-02 01:31:37 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-07-02 01:31:37 +0530 |
| commit | 53d893cde30b11388ba77b904ee9a406c3e879ae (patch) | |
| tree | e0f0e00b52a043c0db67c4ca21c87f40c9664350 /modules/programs/enteauth | |
| parent | 297282601ed6bfa0a4b136bbb0a23e9d9caad69f (diff) | |
| download | home-manager-config-53d893cde30b11388ba77b904ee9a406c3e879ae.tar.gz home-manager-config-53d893cde30b11388ba77b904ee9a406c3e879ae.zip | |
Added ente auth configuration
- Ente Auth 2FA manager
Diffstat (limited to 'modules/programs/enteauth')
| -rw-r--r-- | modules/programs/enteauth/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/programs/enteauth/default.nix b/modules/programs/enteauth/default.nix new file mode 100644 index 0000000..632b979 --- /dev/null +++ b/modules/programs/enteauth/default.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + ... +}: + +# Ente Auth - end-to-end encrypted authentication (2FA) +let + enteAuthWithKeyring = pkgs.symlinkJoin { + name = "ente-auth-wrapped"; + paths = [ pkgs.ente-auth ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/enteauth \ + --prefix PATH : ${ + lib.makeBinPath [ + pkgs.gnome-keyring + pkgs.dbus + ] + } \ + --run "echo 'password' | ${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --unlock --components=secrets" + + rm -rf $out/share/applications/* + + ln -s ${customDesktopItem}/share/applications/* $out/share/applications/ + ''; + }; + + customDesktopItem = pkgs.makeDesktopItem { + name = "enteauth"; + exec = "enteauth"; + icon = "io.ente.auth"; + comment = "End-to-end encrypted 2FA authenticator"; + desktopName = "Ente Auth"; + genericName = "2FA Authenticator"; + categories = [ + "Utility" + "Security" + ]; + terminal = false; + }; +in +{ + options.programs.enteauth = { + enable = lib.mkEnableOption "Enables wrapped ente-auth with automated keyring unlocks and a desktop entry."; + package = lib.mkOption { + type = lib.types.package; + default = enteAuthWithKeyring; + description = "The customized version of ente-auth with a self-unlocking daemon backend."; + }; + }; + + config = lib.mkIf config.programs.enteauth.enable { + home.packages = [ config.programs.enteauth.package ]; + }; +} |
