1
1
Fork 0

nautilus: enable tracker and partially fix startup delay

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-10-25 13:39:46 -05:00
parent 79194e4138
commit 693f313e20
Signed by: myned
GPG key ID: C7224454F7881A34
2 changed files with 30 additions and 9 deletions

View file

@ -226,7 +226,7 @@ in {
(key "B" "Super" "exec" "[group new lock; tile] ${firefox-esr}")
(key "C" "Super" "exec" codium)
(key "E" "Super" "exec" gnome-text-editor)
(key "F" "Super" "exec" nautilus)
(key "F" "Super" "exec" "${nautilus} --new-window")
(key "G" "Super" "workspace" "name:game")
(key "G" "Super+Alt" "workspace" "name:gamescope")
(key "G" "Super+Ctrl+Alt" "exec" "${pkill} gamescope")

View file

@ -5,14 +5,25 @@
...
}:
with lib; let
nautilus = "${pkgs.nautilus}/bin/nautilus";
cfg = config.custom.programs.nautilus;
in {
options.custom.programs.nautilus.enable = mkOption {default = false;};
config = mkIf cfg.enable {
# TODO: Use module when completed
# https://github.com/NixOS/nixpkgs/pull/319535
environment.systemPackages = [pkgs.nautilus];
services = {
gnome.sushi.enable = true; # Quick preview with spacebar
gvfs.enable = true; # Trash dependency
gnome = {
sushi.enable = true; # Quick preview with spacebar
tracker.enable = true; # File indexing
tracker-miners.enable = true;
};
};
# Alternative fix to services.gnome.core-utilities.enable
@ -23,12 +34,22 @@ in {
terminal = "kitty";
};
# TODO: Use module when completed
# https://github.com/NixOS/nixpkgs/pull/319535
environment.systemPackages = with pkgs; [
nautilus
nautilus-open-in-blackbox
nautilus-python
];
home-manager.users.${config.custom.username} = {
# HACK: Partially fix startup delay with background service until module is available
systemd.user.services = {
nautilus = {
Unit.Description = "GNOME Files Background Service";
Install.WantedBy = ["graphical-session.target"];
Service = {
BusName = "org.gnome.Nautilus";
ExecStart = "${nautilus} --gapplication-service";
ExecStop = "${nautilus} --quit";
Restart = "on-failure";
Type = "dbus";
};
};
};
};
};
}