From d14fc3c13d91bd8ef546868a03aa9004aee94beb Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 11 Feb 2025 18:20:43 +0100 Subject: [PATCH] programs/pcmanfm: add daemon service --- modules/programs/pcmanfm.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/programs/pcmanfm.nix b/modules/programs/pcmanfm.nix index 0cc01fc..64e828e 100644 --- a/modules/programs/pcmanfm.nix +++ b/modules/programs/pcmanfm.nix @@ -11,11 +11,25 @@ in { hjem.users.${username} = { packages = with pkgs; [ lxmenu-data - pcmanfm + pcmanfm # builds with gtk3 by default, no need to override shared-mime-info ]; }; - services.gvfs.enable = true; # Mount, trash, and other functionalities + services.gvfs.enable = true; # mount, trash, and other functionalities + + systemd.user.services.pcmanfm = { + description = "PCManFM daemon"; + documentation = ["https://github.com/lxde/pcmanfm"]; + after = ["graphical-session.target"]; + partOf = ["graphical-session.target"]; + wantedBy = ["graphical-session.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.pcmanfm}/bin/pcmanfm --daemon-mode"; + Restart = "on-failure"; + Slice = "background-graphical.slice"; + }; + }; }; }