How do I get a Cinnamon desktop?

Why doesn’t my configuration.nix give me a complete Cinnamon login and desktop?

  • The little ‘spanner’ menu at the top right of the login screen drops down empty, as though no fonts are installed.
  • When I do attempt to log in, it says Failed to start session.
{ config, pkgs, ... }:
	imports =
		[ # Include the results of the hardware scan.
	boot.loader.systemd-boot.enable = true;
	boot.loader.efi.canTouchEfiVariables = true;
	networking.networkmanager = {
		enable = true;
		packages = [ pkgs.networkmanager_openvpn ];
	networking.hostName = "ida"; # Define your hostname.
	time.timeZone = "Australia/Brisbane";
	networking.useDHCP = false;
	networking.interfaces = {
		enp0s25.useDHCP = true;
		wlp3s0.useDHCP = true;
	i18n.defaultLocale = "en_US.UTF-8";
	fileSystems."/mnt/onedrive" = /* OMIITED */;
	fileSystems."/home/mounty/vault" = /* OMITTED */;
	services.xserver.enable = true;
	services.xserver.libinput.enable = true;
	services.xserver.displayManager.cinnamon.enable = true;
	services.xserver.displayManager.lightdm.enable = true;
	services.printing.enable = true;
	sound.enable = true;
	hardware.pulseaudio.enable = true;
	users.users.mounty = /* OMITTED */;
	environment.systemPackages = with pkgs; [
		wget pciutils
		git vim gh mercurial glmark2 nodejs jdk openjdk spring-boot binutils-unwrapped
		efibootmgr maven mysql-client gnumeric gnupg openssl awscli azure-cli putty
		inetutils usbutils networkmanager gcc11 rustc cargo kotlin libreoffice graphviz
		php python python3Full python38Packages.pip python38Packages.setuptools
		(pkgs.texlive.combine {
			inherit (pkgs.texlive) scheme-full pgf ;
		unzip vim_configurable vlc zip ark firefox chromium
	programs.command-not-found.enable = true;
	services.openssh = {
		enable = true;
		passwordAuthentication = false;
		ports = [ 3887 ];
	networking.firewall.enable = false;
	system.stateVersion = "21.11";

Nothing helpful in /var/log/lightdm/*

I think it might be that I can’t select a Cinnamon session; when I click on the ‘spanner’ menu, wherever I click on it, the ‘spanner’ icon remains. From memory of other systems, it should show an icon related to Gnome, plain Xsession etc. So the key is to get that ‘spanner’ drop-down menu showing something.

Kept fiddling, fixed it myself:

	services.xserver = {
		enable = true;
		libinput.enable = true;
		displayManager.lightdm.enable = true;
		desktopManager = {
			cinnamon.enable = true;
		displayManager.defaultSession = "cinnamon";
1 Like

Mark it as a solution maybe :slight_smile: Yes, in general look for options first, packages second, especially for complex things like DEs. It’s odd that the defaultsession wasn’t set correctly by default.

Ah, hm, maybe this should pick one of the enabled sessions by default, rather than being hard wired to gnome: services.xserver.displayManager.defaultSession