nixos-cosmic packages a desktop environment that is still being built
Flake for using COSMIC on NixOS
At a glance
- What is it?
- nixos-cosmic is a Nix package set and NixOS module for the COSMIC desktop, described by its own author as mainly a repository for testing COSMIC while it is developed. Using it means pointing a flake at a special nixpkgs branch, trusting a Cachix binary cache, and accepting that a stable NixOS release may force you to build the packages locally with 16 GiB of RAM and 40 GiB of disk.
- Who is it for?
- NixOS users who want to run COSMIC as it is being developed, and who are comfortable with flakes and a moving nixpkgs branch, will find this repository the practical way to do that, and the cached substituters make the first build affordable. It is the wrong choice if you need a stable desktop, since the project exists to track a development branch rather than to pin one, and it is the wrong choice on a stable release where the cache does not cover your branch.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Nix, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A package set and module, not a finished distribution
nixos-cosmic is two things in one repository: a Nix package set and a NixOS module for using COSMIC, the desktop environment. The project states its own purpose plainly, saying it is mainly a repository for testing COSMIC as it is developed. That single sentence tells you what to expect from the code and the release cadence, and it is the sentence to read before you point a production machine at it. The repository root is small and tells its own story: `flake.nix` and `flake.lock` for the flake interface, `default.nix` and `pkgs/` for the package set, `module.nix` and the `nixos/` directory for the module, and a `license` file. There are no GitHub releases, the licence is MIT, and the last push to the repository was on 2026-10-20 with the repository not archived, so the content moves with the upstream desktop rather than on a version cycle of its own.
The flake wiring pulls a special nixpkgs branch
If you already keep a `configuration.nix`, the documentation says you can use the `nixos-cosmic` flake from an adjacent `flake.nix`, for example in `/etc/nixos`. The inputs block is where the interesting decisions are made:
inputs = {
nixpkgs.follows = "nixos-cosmic/nixpkgs"; # NOTE: change "nixpkgs" to "nixpkgs-stable" to use stable NixOS release
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
};The `follows` line is the mechanism that ties your nixpkgs to the one the COSMIC packages were built against, and the inline comment records the alternative, using `nixpkgs-stable` to follow the stable NixOS release instead. The `nixos-cosmic.url` line then points at the repository itself. The outputs block applies the module to your system by listing `nixos-cosmic.nixosModules.default` alongside your own `./configuration.nix` in the module list, and the same block carries the binary cache settings, with `substituters` pointing at `https://cosmic.cachix.org/` and a matching `trusted-public-keys` entry. Everything else, the hostname in the configuration name, is yours to fill in.
Flakes take away nix-channel and nixos-rebuild --upgrade
The documentation flags a consequence of moving from traditional evaluation to flakes, and it is worth taking seriously before you switch. Once you are on flakes, `nix-channel` no longer has any effect on the nixpkgs your system is built with, and therefore `nixos-rebuild --upgrade` also no longer has any effect. The documented replacement is to run `nix flake update` from your flake directory to update nixpkgs and nixos-cosmic. In practice this changes the muscle memory of a NixOS upgrade from one command to another, and it moves the lock file, `flake.lock`, into the position where the channel used to sit. The order of operations also matters: the documentation asks you to perform a `nixos-rebuild test` with the substituters configured before you try to add any COSMIC packages or settings, so that the binary substituters are set up before any COSMIC package is pulled.
Enabling the session, the greeter and Flathub
Once the module is in place, the desktop is turned on with two options in your NixOS configuration, `services.desktopManager.cosmic.enable` and `services.displayManager.cosmic-greeter.enable`, both set to true. The greeter is the login screen, and enabling it alongside the session manager is what makes COSMIC the environment you actually log into rather than something you launch by hand. If you want the COSMIC Store to manage Flatpaks, the documentation adds two more steps: set `services.flatpak.enable` to true, then add the Flathub repository from your user terminal with `flatpak remote-add --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo`. The per-user remote is deliberate, since the command is run in the user terminal rather than configured system-wide. Beyond that, the documentation links a dedicated development matrix room for the project, which is where the people testing COSMIC on NixOS coordinate.
Expect a local build if your branch is not cached
There is a binary cache, but it is built against the current `nixos-unstable` and `nixos-24.11` branches. If you are not on one of those, the documentation says you may need to build the packages locally, and it gives the cost: roughly 16 GiB of RAM and 40 GiB of disk space. The way to fit a smaller machine is to reduce build parallelism, either with `--cores 1` or with `-j 1`, or both, on the `nix build`, `nix-build` and `nixos-rebuild` commands. That is a real trade-off on a laptop, because a serial build of a desktop environment is slow, and it is the reason the stable branch exists in the inputs comment. The practical decision for an adopter is which nixpkgs branch to follow, and the answer follows from your hardware and your tolerance for a long first build rather than from anything in the module itself.
Three failure modes with documented fixes
The troubleshooting section is where this repository earns its keep, because each entry is a specific symptom with a specific configuration change. The first is a phantom non-existent display on Nvidia, tracked as cosmic-randr issue 13, where `cosmic-settings` and `cosmic-randr list` show an extra display that cannot be disabled. The fix is Nvidia's experimental framebuffer device, added as a kernel parameter:
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];The second is the clipboard manager not working, which needs the `zwlr_data_control_manager_v1` protocol to be available, enabled in cosmic-comp through `environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1`. The third is Observatory not working, which requires the monitord service to be enabled, with `systemd.packages` including `pkgs.observatory` and the service wanted by `multi-user.target`:
systemd.packages = [ pkgs.observatory ];
systemd.services.monitord.wantedBy = [ "multi-user.target" ];The common thread is that COSMIC on NixOS is assembled from parts that each need to be switched on, and the documentation records which ones.
Editorial conclusion
NixOS users who want to run COSMIC as it is being developed, and who are comfortable with flakes and a moving nixpkgs branch, will find this repository the practical way to do that, and the cached substituters make the first build affordable. It is the wrong choice if you need a stable desktop, since the project exists to track a development branch rather than to pin one, and it is the wrong choice on a stable release where the cache does not cover your branch. Before switching, run `nixos-rebuild test` with the substituters in place, confirm you can spare 16 GiB of RAM and 40 GiB of disk for a local build, and read the flake note about `nix flake update` replacing `nixos-rebuild --upgrade`.
Frequently asked questions
How do I install COSMIC on NixOS with nixos-cosmic?
Add the flake inputs, with nixpkgs following the nixos-cosmic nixpkgs branch and nixos-cosmic pointing at the GitHub repository, then include `nixos-cosmic.nixosModules.default` in your module list alongside your own configuration. After a `nixos-rebuild test` sets up the binary substituters, enable `services.desktopManager.cosmic.enable` and `services.displayManager.cosmic-greeter.enable`.
What does switching to flakes change about upgrading NixOS?
The documentation notes that with flakes, `nix-channel` no longer has any effect on the nixpkgs your system is built with, and `nixos-rebuild --upgrade` no longer has any effect either. You update with `nix flake update` from your flake directory, which updates nixpkgs and nixos-cosmic.
How much RAM and disk space do I need to build the COSMIC packages?
The documentation says you will generally need roughly 16 GiB of RAM and 40 GiB of disk space. It can be built with less RAM by reducing build parallelism, either with `--cores 1` or `-j 1` or both, on the nix build, nix-build and nixos-rebuild commands.
How do I fix a phantom display on Nvidia in COSMIC?
If cosmic-settings and cosmic-randr list show an additional display that cannot be disabled, the documentation points at cosmic-randr issue 13 and suggests enabling Nvidia's experimental framebuffer device with `boot.kernelParams = [ "nvidia_drm.fbdev=1" ];`.
How do I use Flathub with the COSMIC Store?
Set `services.flatpak.enable` to true in your NixOS configuration, then add the Flathub repository from your user terminal with `flatpak remote-add --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo`.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/lilyinstarlight-nixos-cosmic)Was this useful?