Jump to content

Nemo: Difference between revisions

From Official NixOS Wiki
Phobos (talk | contribs)
mNo edit summary
Added set default file manager for NixOS
Line 9: Line 9:
=== Set Nemo as default file browser ===
=== Set Nemo as default file browser ===


==== Home-Manager ====
To set Nemo as the default file browser, [[Default_applications|create a desktop entry]] and set it as a default application using [[Home Manager]]:
To set Nemo as the default file browser, [[Default_applications|create a desktop entry]] and set it as a default application using [[Home Manager]]:


Line 23: Line 24:
     };
     };
};}}
};}}
==== NixOS ====
On NixOS, you don't need to create a nemo.desktop file. Just add the following to your configuration:<syntaxhighlight lang="nixos"># configuration.nix
{ config, pkgs, ... }:
{
  # ...
  xdg = {
    mime.defaultApplications = {
      "inode/directory" = [ "nemo.desktop" ];
      "application/x-gnome-saved-search" = [ "nemo.desktop" ];
    };
  };
  # ...
}</syntaxhighlight>


=== Change the default terminal emulator for Nemo ===
=== Change the default terminal emulator for Nemo ===

Revision as of 20:22, 19 March 2026

Nemo is the default file manager for Cinnamon.

Installation

Install the nemo-with-extensions or nemo package.

Configuration

Set Nemo as default file browser

Home-Manager

To set Nemo as the default file browser, create a desktop entry and set it as a default application using Home Manager:

❄︎ ~/.config/home-manager/home.nix
xdg.desktopEntries.nemo = {
    name = "Nemo";
    exec = "${pkgs.nemo-with-extensions}/bin/nemo";
};
xdg.mimeApps = {
    enable = true;
    defaultApplications = {
        "inode/directory" = [ "nemo.desktop" ];
        "application/x-gnome-saved-search" = [ "nemo.desktop" ];
    };
};

NixOS

On NixOS, you don't need to create a nemo.desktop file. Just add the following to your configuration:

# configuration.nix

{ config, pkgs, ... }:
{
  # ...
  xdg = {
    mime.defaultApplications = {
      "inode/directory" = [ "nemo.desktop" ];
      "application/x-gnome-saved-search" = [ "nemo.desktop" ];
    };
  };
  # ...
}

Change the default terminal emulator for Nemo

To change the default terminal emulator for Nemo, set dconf.settings in the Home Manager config:

❄︎ ~/.config/home-manager/home.nix
dconf = {
    settings = {
        "org/cinnamon/desktop/applications/terminal" = {
            exec = "terminal-name";
            # exec-arg = ""; # argument
        };
    };
};

Set keyboard shortcut for "Open in terminal"

To edit keyboard shortcuts, set dconf.settings and edit ~/.gnome2/accels/nemo using Home Manager (replacing "F4" with the desired key combination):

❄︎ ~/.config/home-manager/home.nix
dconf = {
    settings = {
        "org/cinnamon/desktop/interface" = {
            can-change-accels = true;
        };
    };
};
home.file = {
    ".gnome2/accels/nemo".text = ''
    (gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F4")
    '';
};


<Alt>, <Primary>, and <Shift> can be used as key modifiers (for example, <Primary><Shift>t).

See Nemo - ArchWiki for further information.