2024-10-21 12:31:30 +07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-10-17 07:58:29 +07:00
|
|
|
let
|
|
|
|
cfg = config.profile.hyprland;
|
|
|
|
inherit (lib) mkIf;
|
|
|
|
inherit (lib.meta) getExe;
|
|
|
|
secretKey = "gnome-keyring/${config.home.username}";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = mkIf cfg.enable {
|
2024-11-24 11:02:56 +07:00
|
|
|
home.packages = with pkgs; [ gnome-keyring ];
|
2024-10-17 07:58:29 +07:00
|
|
|
|
|
|
|
sops.secrets.${secretKey} = { };
|
|
|
|
wayland.windowManager.hyprland.settings.exec-once =
|
|
|
|
let
|
2024-10-21 12:31:30 +07:00
|
|
|
scriptFile = getExe (
|
|
|
|
pkgs.writeShellScriptBin "gnome-keyring.sh" # sh
|
|
|
|
''
|
|
|
|
cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock
|
|
|
|
gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
|
|
|
''
|
|
|
|
);
|
2024-10-17 07:58:29 +07:00
|
|
|
in
|
2024-10-21 12:31:30 +07:00
|
|
|
[ ''${scriptFile}'' ];
|
2024-10-17 07:58:29 +07:00
|
|
|
};
|
|
|
|
}
|