Porting Cinnamon to NixOS

Hey folks,

I’ve been working on porting Cinnamon (latest release) to NixOS and so far my work is published at:


I am, however, having various problems getting this in to a state where it works properly such as:

  • Running cinnamon results in Settings schema 'org.cinnamon.desktop.wm.preferences' is not installed.
  • Running cinnamon-session results in Segmentation fault

There is also certainly room for code improvements.

With this in mind - I’m really hoping someone out there is also interested in this little project and can offer any assistance at all?

Thanks in advance!


I’d be happy to help you with this :sunny:

First thing I’ll try doing is upstreaming a variant of the py-override patch https://github.com/cawilliamson/nixos-cinnamon/blob/6ed499319aef8f3b65b69417114d6e2b58eb23ed/xapps/py-override.patch for xapps.

Edit: opened https://github.com/linuxmint/xapps/pull/65

As I’ve mentioned, you’ll need to add wrapGAppsHook to nativeBuildInputs for basically everything that provides a binary.

1 Like

Is this still active?

I’d be interested in helping.

Haven’t had any correspondence with @chrisaw for a bit.
Just know, if we were to accept this in nixpkgs, it for sure requires a level of commitment in so far as maintenance. And that can entail responding to nixos users bugs and working with upstream to keep cinnamon compatible on nixos.

I’ve thought about this.

While it’s going to require a good amount of effort, I’d like to tackle this task.
I’d be damned to do maintenance anyways, because I’ll use it myself, so you can count on me, but I’d need a bit of help with making this port, since I’m relatively new to nixOS.

And I can’t wait to switch to nixOS!

1 Like

https://github.com/NixOS/nixpkgs/pull/74242 WIP PR

How can I use that version of nixpkgs in my local nixOS install?

You can build from your git checkout like

sudo nixos-rebuild -I nixpkgs=/path/to/my/checkout

and I believe set this option so you can use this path automatically for subsequent uses

nix.nixPath = [ 

Though, as your code is wip I don’t recommend doing this to test this.
NixOS has a pretty nice feature of being able to create qemu vm’s on the fly from a NixOS configuration. See nixos-rebuild build-vm.

I personally do the following to launch a vm quickly.

nix run vm -f $nixpkgs_path/nixos --arg configuration "$PWD"/configuration.nix -c run-nixos-vm

Where configuration.nix is the NixOS config to use for this machine.

Here’s an example of what I’d use for a gnome3 vm

  # more common config

  users.users.worldofpeace = {
    createHome = true;
    isNormalUser = true;
    extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
    password = "";
  users.users.root.password = "";

  services.mingetty.autologinUser = "root";  

  services.openssh = {
    enable = true;
    permitRootLogin = "yes";
    extraConfig = ''
      PermitEmptyPasswords yes
  # Forward ssh, the like
  virtualisation.qemu.networkingOptions = [
    "-net nic,netdev=user.0,model=virtio"
    "-netdev user,id=user.0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS},hostfwd=tcp::8088-:80,hostfwd=tcp::2222-:22"
    "-soundhw hda"

  # Use good amount of memory
  virtualisation.memorySize = lib.mkDefault 3000;

  # vm config

  services.xserver.enable = true;
  services.xserver.desktopManager.gnome3 = {
    enable = true;

  services.xserver.displayManager.gdm = {
    enable = true;

  system.stateVersion = "20.03";

Note the ssh configuration, this allows you to ssh into the vm without login on port 2222 localhost.

1 Like

My whole nixOS setup is WIP, so no problem :stuck_out_tongue:

I’m running a qemu VM directly from my second harddrive that will eventually evolve into my nixOS install for daily usage (Blocked by, among other things, adding cinnamon)

I’ll look into creating a proper VM, since I’ll probably need to test cinnamon with lightdm as well, since I’m currently using gdm3.