From 4140a1bb6c664c4f666cdc693812e2a879bb46dd Mon Sep 17 00:00:00 2001 From: Myned Date: Mon, 4 Nov 2024 11:11:02 -0600 Subject: [PATCH] nautilus: add turtle service to fix git integration Signed-off-by: Myned --- options/custom/programs/nautilus.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/options/custom/programs/nautilus.nix b/options/custom/programs/nautilus.nix index 7fe4270..0a7526a 100644 --- a/options/custom/programs/nautilus.nix +++ b/options/custom/programs/nautilus.nix @@ -5,8 +5,6 @@ ... }: with lib; let - nautilus = "${pkgs.nautilus}/bin/nautilus"; - cfg = config.custom.programs.nautilus; in { options.custom.programs.nautilus.enable = mkOption {default = false;}; @@ -14,7 +12,7 @@ in { config = mkIf cfg.enable { # TODO: Use module when completed # https://github.com/NixOS/nixpkgs/pull/319535 - environment.systemPackages = [pkgs.nautilus]; + environment.systemPackages = with pkgs; [nautilus]; services = { gvfs.enable = true; # Trash dependency @@ -36,7 +34,10 @@ in { home-manager.users.${config.custom.username} = { # HACK: Partially fix startup delay with background service until module is available - systemd.user.services = { + systemd.user.services = let + nautilus = "${pkgs.nautilus}/bin/nautilus"; + turtle_service = "${pkgs.turtle}/bin/turtle_service"; + in { nautilus = { Unit.Description = "GNOME Files Background Service"; Install.WantedBy = ["graphical-session.target"]; @@ -49,6 +50,19 @@ in { Type = "dbus"; }; }; + + # Git integration dependency + turtle = { + Unit.Description = "Turtle Background Service"; + Install.WantedBy = ["graphical-session.target"]; + + Service = { + BusName = "de.philippun1.turtle"; + ExecStart = turtle_service; + Restart = "no"; + Type = "dbus"; + }; + }; }; }; };