2022-05-30 17:18:18 +00:00
|
|
|
{ config, pkgs, lib, ... }: {
|
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
options = {
|
|
|
|
nautilus = {
|
|
|
|
enable = lib.mkEnableOption {
|
|
|
|
description = "Enable Nautilus file manager.";
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-05-30 17:18:18 +00:00
|
|
|
# Install Nautilus file manager
|
2022-12-21 21:18:03 +00:00
|
|
|
config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
|
2022-05-30 17:18:18 +00:00
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
gnome.nautilus
|
2022-05-30 20:07:43 +00:00
|
|
|
gnome.sushi # Quick preview with spacebar
|
2022-05-30 17:18:18 +00:00
|
|
|
];
|
2022-11-14 15:35:16 +00:00
|
|
|
|
2023-04-04 01:54:53 +00:00
|
|
|
xsession.windowManager.i3.config.keybindings = {
|
|
|
|
"${
|
|
|
|
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
|
|
|
}+n" = "exec --no-startup-id ${pkgs.gnome.nautilus}/bin/nautilus";
|
|
|
|
};
|
2023-02-17 23:14:57 +00:00
|
|
|
|
2022-11-14 15:35:16 +00:00
|
|
|
programs.fish.functions = {
|
|
|
|
qr = {
|
|
|
|
body =
|
|
|
|
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
|
|
|
|
};
|
|
|
|
};
|
2023-04-04 01:54:53 +00:00
|
|
|
|
|
|
|
# Set default for opening directories
|
|
|
|
xdg.mimeApps = {
|
|
|
|
associations.added."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
|
|
|
# associations.removed = {
|
|
|
|
# "inode/directory" = [ "kitty-open.desktop" ];
|
|
|
|
# };
|
|
|
|
defaultApplications."inode/directory" =
|
|
|
|
lib.mkBefore [ "org.gnome.Nautilus.desktop" ];
|
|
|
|
};
|
2022-05-30 17:18:18 +00:00
|
|
|
};
|
2023-02-28 05:11:59 +00:00
|
|
|
|
2023-04-04 01:54:53 +00:00
|
|
|
# # Set default for opening directories
|
|
|
|
# xdg.mime = {
|
|
|
|
# addedAssociations."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
|
|
|
# removedAssociations = { "inode/directory" = [ "kitty-open.desktop" ]; };
|
|
|
|
# defaultApplications."inode/directory" =
|
|
|
|
# lib.mkForce [ "org.gnome.Nautilus.desktop" ];
|
|
|
|
# };
|
|
|
|
|
2022-05-30 17:18:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|