From 32603de0dc988d60a7b80774dd7aed1083cd9629 Mon Sep 17 00:00:00 2001 From: Physics Enthusiast <118960463+physics-enthusiast@users.noreply.github.com> Date: Sun, 13 Aug 2023 08:38:40 +0000 Subject: [PATCH] Configure the systemd user service to start with graphical session if use of a passphrase is detected (#346) * Update sops.nix systemd user service target * Use conditional to detect if gnupg.home is set before setting the WantedBy to graphical-session.target --- modules/home-manager/sops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index ef73737..f1e4dfe 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -241,7 +241,7 @@ in { Type = "oneshot"; ExecStart = script; }; - Install.WantedBy = [ "default.target" ]; + Install.WantedBy = if cfg.gnupg.home != null then [ "graphical-session.target" ] else [ "default.target" ]; }; launchd.agents.sops-nix = {