COSMIC: Difference between revisions

Minor adjustment to installation section, added new Configuration and Tips and tricks sections
Line 3: Line 3:
COSMIC was primarily developed for use in the [https://pop.system76.com/ Pop!_OS] distribution.
COSMIC was primarily developed for use in the [https://pop.system76.com/ Pop!_OS] distribution.


== NixOS module (starting with NixOS 25.05) ==
== Installation (starting with NixOS 25.05) ==


COSMIC support in nixpkgs is still in development. You can follow progress via [https://github.com/NixOS/nixpkgs/issues/259641 the tracking issue].  
COSMIC support in nixpkgs is still in development. You can follow progress via [https://github.com/NixOS/nixpkgs/issues/259641 the tracking issue].  
Line 23: Line 23:
</syntaxhighlight>Alternatively, there is a [https://github.com/lilyinstarlight/nixos-cosmic flake] to setup COSMIC on NixOS.
</syntaxhighlight>Alternatively, there is a [https://github.com/lilyinstarlight/nixos-cosmic flake] to setup COSMIC on NixOS.


== COSMIC packages ==
== Configuration ==


While the whole desktop is not configured many packages are available in nixpkgs already. You can search for packages with a query similar to this one https://search.nixos.org/packages?query=cosmic&from=0&size=1000&sort=relevance&channel=unstable. Note that not all of the results will be part of the COSMIC desktop.
COSMIC stores its configuration in [https://github.com/ron-rs/ron Rusty Object Notation (RON)] files. By default, the system-wide configuration is used unless user-specific files are present.
Currently, NixOS does not provide declarative options for configuring COSMIC through the NixOS module system.
 
=== System-wide configuration ===
 
If no user configuration exists, COSMIC falls back to system-wide defaults. These configuration files are bundled with each cosmic package and are located in their respective <code>[package]/share/cosmic/</code> directories.
 
When COSMIC is enabled using the NixOS option <code>services.desktopManager.cosmic.enable = true;</code>, the <code>/share/cosmic</code> directories from the relevant packages are symlinked into <code>/run/current-system/sw</code>.
 
This allows COSMIC to locate and apply the default configurations at runtime.
 
=== User configuration ===
 
User configuration files are located in <code>~/.config/cosmic/</code>.
 
They override the system defaults when present, and are automatically created or updated when using the COSMIC Settings application.
 
=== Component-specific configuration ===
 
Each COSMIC component maintains its own configuration files. For example, the COSMIC Panel reads and stores its configuration at <code>~/.config/cosmic/com.system76.CosmicPanel.Panel</code>
Components can be configured by modifying these files directly. For instance, to place the Time and Notifications applets in the center of the COSMIC panel, create the following file:
 
{{file|3=
Some([
    "com.system76.CosmicAppletTime",
    "com.system76.CosmicAppletNotifications",
])
|name=~/.config/cosmic/com.system76.CosmicPanel.Panel/v1/plugins_center|lang=rust}}
 
Most configuration changes are applied immediately without needing to restart the session.
 
== Tips and tricks ==
 
=== Excluding COSMIC applications ===
 
To exclude certain applications that are installed by default with COSMIC, set the {{nixos:option|environment.cosmic.excludePackages}} module option (only available in 25.11):
 
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
  environment.cosmic.excludePackages = with pkgs; [
    cosmic-edit
  ];
</nowiki>}}


[[Category:Desktop environment]]
[[Category:Desktop environment]]