Unstable Cosmic DE in stable Nixos

Cosmic Desktop is now available in Nixos Unstable NixOS Search

I tried it using Nixos unstable, but I have just too much screen tearing issues with my AMD Framework. Tested with other DE’s and still the same issues.

Could I run a Cosmic DE from unstable in Nixos stable through a /etc/nixos/unstable.nix file import in my configuration.nix file, so I don’t have to use flakes?

Thanks!

Have you ensured that the kernel is exactly the same?

I use this in my configuration.nix

#Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [“amdgpu.sg_display=0”];
boot.initrd.kernelModules = [ “amdgpu” ];

Should a set it to a specific kernel?

I have had issues within different patches of the same release, so I wouldn’t be surprised.

Try different releases or use pkgs.linuxPackages_latest from the stable branch (yes, you can mix and match stuff from an N amount of inputs)

Nightly builds of COSMIC are available for Stable and Unstable NixOS from GitHub - lilyinstarlight/nixos-cosmic: Flake for using COSMIC on NixOS

1 Like

Can you explain how I should do that in my config?

Thanks, never used flakes and want to prevent that for now…

You’re not required to use Flakes, it’s just not documented.

All you actually have to do to use the ‘Flake’ without Flakes is:

  • Download the repository with builtins.fetchTarball
  • Add the module from the repository to your NixOS imports

Everything else is the same as with Flakes.

There’s around 3 ways to do it.

Take a look at (without flakes). I used to just have a channel and import the channel.

Namely, what you want to do is something similar to this:

In console:

sudo nix-channel --add https://nixos.org/channels/nixos-${YOUR-RELEASE} ${DESIRED-NAME}
sudo nix-channel --update

In configuration.nix:

{
  config,
  lib,
  ...
  # blah blah blah
}:
let
  stable = import <${DESIRED-NAME}> {};
in
{
  # whatever's in your configuration
  boot.kernelPackages = pkgs.stable.linuxPackages_latest;
}

(Do not copypaste things like ${YOUR-RELEASE}, you’re supposed to replace them with normal text)

I’m not really sure it’s worth pulling the kernel from Stable into Unstable, given that 25.05 is due to be released in around a month and therefore Stable and Unstable aren’t going to deviate significantly anymore.

Have you considered using the latest LTS kernel rather than the latest stable?

Thank you @hustlerone and @drakon ! I will give it a try

Well, the latest kernel from 24.11 worked for him, so I’d start from there