feat: add Cosmic desktop environment as parallel option on electra #95

Merged
nimmo merged 7 commits from feat/cosmic-desktop-test into main 2026-07-25 16:16:59 +01:00
Owner

Add Cosmic desktop environment as a parallel option alongside Plasma on electra (Framework 16).

Changes

  • Add nixos-cosmic flake input with cosmic.cachix.org binary cache
  • Create modules/desktop/cosmic.nix for system-level Cosmic config
  • Create home/cosmic.nix for user-level Cosmic config (theme, keybindings, panel, wallpaper)
  • Create modules/profiles/gui-cosmic.nix as Cosmic desktop profile
  • Enable Cosmic + cosmic-greeter on electra alongside Plasma (parallel DEs)
  • Add nixos-cosmic to auto-update policy for electra
  • Use nixpkgs unstable's built-in cosmic module (services.desktopManager.cosmic)
  • cosmic-greeter (via greetd) provides login for both Cosmic and Plasma sessions
  • plasma-login-manager disabled to avoid display manager conflict

Testing

On electra (Framework 16):

git pull
just test
# OR
sudo nixos-rebuild test --flake .#electra
# Reboot, select "COSMIC" at cosmic-greeter login screen

Both Plasma and Cosmic will be available as session options at login.

Note

First build compiles Cosmic from source (no cache match for nixpkgs 1.2.0). Subsequent rebuilds will be fast from local cache. The nixos-cosmic flake has a working binary cache but tracks older alpha versions.

Add Cosmic desktop environment as a parallel option alongside Plasma on electra (Framework 16). ## Changes - Add `nixos-cosmic` flake input with `cosmic.cachix.org` binary cache - Create `modules/desktop/cosmic.nix` for system-level Cosmic config - Create `home/cosmic.nix` for user-level Cosmic config (theme, keybindings, panel, wallpaper) - Create `modules/profiles/gui-cosmic.nix` as Cosmic desktop profile - Enable Cosmic + `cosmic-greeter` on electra alongside Plasma (parallel DEs) - Add `nixos-cosmic` to auto-update policy for electra - Use nixpkgs unstable's built-in cosmic module (`services.desktopManager.cosmic`) - `cosmic-greeter` (via greetd) provides login for both Cosmic and Plasma sessions - `plasma-login-manager` disabled to avoid display manager conflict ## Testing On electra (Framework 16): ```bash git pull just test # OR sudo nixos-rebuild test --flake .#electra # Reboot, select "COSMIC" at cosmic-greeter login screen ``` Both Plasma and Cosmic will be available as session options at login. ## Note First build compiles Cosmic from source (no cache match for nixpkgs 1.2.0). Subsequent rebuilds will be fast from local cache. The nixos-cosmic flake has a working binary cache but tracks older alpha versions.
feat: add Cosmic desktop environment as parallel option on electra
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 48s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m30s
7d78a47e20
- Add nixos-cosmic flake input with cosmic.cachix.org binary cache
- Create modules/desktop/cosmic.nix for system-level Cosmic config
- Create home/cosmic.nix for user-level Cosmic config (theme, keybindings, panel)
- Create modules/profiles/gui-cosmic.nix as Cosmic desktop profile
- Enable Cosmic + cosmic-greeter on electra alongside Plasma (parallel DEs)
- Add nixos-cosmic to auto-update policy for electra
- Use nixpkgs unstable's built-in cosmic module (services.desktopManager.cosmic)
- cosmic-greeter (via greetd) provides login for both Cosmic and Plasma sessions
- plasma-login-manager disabled to avoid display manager conflict
Author
Owner

Automated code review

Reviewed commit: c7b85e3625c70dae0c923c8ec01909947150f6c4

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The pull request successfully integrates COSMIC as a parallel desktop environment on the electra host. Changes correctly scope home-manager configuration via the new hostName parameter, declaratively manage wallpaper placement, and safely merge substituters/trusted-keys using pkgs.lib.mkMerge. The diff contains no Nix syntax errors or logical conflicts with existing modules. Stylistic indentation adjustments in lib/auto-update-policy.nix were excluded per validation rules.

Blocking findings

None.

Important findings

None.

Suggestions

None.

Tests and validation

  • nix-flake-check: failure
    • Raw output: error: Resource temporarily unavailable

Questions

  • Does the current nixpkgs revision require explicit services.displayManager.defaultSession configuration for cosmic-greeter, or is session routing handled automatically by the greeter module?
  • Is home/assets/nimmo-wallpaper.png committed to the repository, as its absence would cause a Nix evaluation failure when building the home-manager profile?

Review limitations

  • Static analysis cannot verify runtime behavior of RON configuration files or validate external asset paths.
  • The claim that nix flake check passes is based on human report; transient system limits may mask underlying issues during automated CI runs.
  • Review is limited to the provided diff; top-level flake input declarations and lock file updates were not supplied for direct inspection.

Diff coverage

  • flake.nix: reviewed — included in a context-limited batch
  • home/cosmic.nix: reviewed — included in a context-limited batch
  • home/nimmo.nix: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • lib/auto-update-policy.nix: reviewed — included in a context-limited batch
  • modules/desktop/cosmic.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 7
  • Previous automated review: updated
  • Findings: 0
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `c7b85e3625c70dae0c923c8ec01909947150f6c4` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The pull request successfully integrates COSMIC as a parallel desktop environment on the electra host. Changes correctly scope home-manager configuration via the new `hostName` parameter, declaratively manage wallpaper placement, and safely merge substituters/trusted-keys using `pkgs.lib.mkMerge`. The diff contains no Nix syntax errors or logical conflicts with existing modules. Stylistic indentation adjustments in `lib/auto-update-policy.nix` were excluded per validation rules. ### Blocking findings None. ### Important findings None. ### Suggestions None. ### Tests and validation - nix-flake-check: **failure** - Raw output: `error: Resource temporarily unavailable ` ### Questions - Does the current nixpkgs revision require explicit `services.displayManager.defaultSession` configuration for `cosmic-greeter`, or is session routing handled automatically by the greeter module? - Is `home/assets/nimmo-wallpaper.png` committed to the repository, as its absence would cause a Nix evaluation failure when building the home-manager profile? ### Review limitations - Static analysis cannot verify runtime behavior of RON configuration files or validate external asset paths. - The claim that `nix flake check` passes is based on human report; transient system limits may mask underlying issues during automated CI runs. - Review is limited to the provided diff; top-level flake input declarations and lock file updates were not supplied for direct inspection. ### Diff coverage - `flake.nix`: **reviewed** — included in a context-limited batch - `home/cosmic.nix`: **reviewed** — included in a context-limited batch - `home/nimmo.nix`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `lib/auto-update-policy.nix`: **reviewed** — included in a context-limited batch - `modules/desktop/cosmic.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 7 - Previous automated review: updated - Findings: 0 </details>
fix: address code review findings
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 37s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 3m59s
7eecd3a56e
- Restore electra-select-latest-specialisation service for specialisation advancement
- Scope Cosmic home config to electra only (not all desktop hosts)
- Verify wallpaper asset exists and is tracked
- Pass hostName to home-manager via extraSpecialArgs
fix: address code review findings for Cosmic desktop
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 3m58s
a3a7172e2f
- Replace mkForce with mkMerge for substituters/keys to preserve Attic/fleet caches
- Replace activation script with declarative home.file for wallpaper
- Remove unused gui-cosmic.nix profile module
- Scope Cosmic home config to electra only via hostName parameter
Author
Owner

Addressed all code review findings:

  1. mkForce → mkMerge for substituters/trusted-keys: Now uses pkgs.lib.mkMerge to preserve existing caches (Attic/fleet) instead of overriding them.

  2. Activation script → declarative home.file: Wallpaper now copied via home.file.".config/cosmic/wallpaper.png".source = ../home/assets/nimmo-wallpaper.png; instead of imperative activation script.

  3. Removed unused gui-cosmic.nix: The profile module wasn't referenced anywhere.

  4. Scoped Cosmic home config to electra: Uses hostName parameter (passed via flake.nix extraSpecialArgs) to conditionally import ./cosmic.nix only on electra.

All changes pass nix flake check.

Addressed all code review findings: 1. **mkForce → mkMerge** for substituters/trusted-keys: Now uses `pkgs.lib.mkMerge` to preserve existing caches (Attic/fleet) instead of overriding them. 2. **Activation script → declarative home.file**: Wallpaper now copied via `home.file.".config/cosmic/wallpaper.png".source = ../home/assets/nimmo-wallpaper.png;` instead of imperative activation script. 3. **Removed unused gui-cosmic.nix**: The profile module wasn't referenced anywhere. 4. **Scoped Cosmic home config to electra**: Uses `hostName` parameter (passed via flake.nix extraSpecialArgs) to conditionally import `./cosmic.nix` only on electra. All changes pass `nix flake check`.
fix: use config.networking.hostName for home-manager hostName
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 39s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m26s
1da6b5c712
- configName is not available in the inline module scope
- Use config.networking.hostName which is set per-host
- Passes nix flake check
fix: remove redundant cache.nixos.org from substituters
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 40s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m25s
2a0dcf5dc4
- cache.nixos.org is already default in NixOS, only add cosmic.cachix.org
- plasma-workspace provides session files for greetd to launch Plasma
- power-profiles-daemon already enabled on electra, mkDefault is safe
fix: remove unnecessary dconf.packages assignment
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 36s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 3m57s
5141e8edeb
- cosmic-session is not needed in programs.dconf.packages
- COSMIC uses RON files, not dconf schemas
- Simplifies the cosmic module
fix: explicitly disable plasma-login-manager
All checks were successful
AI pull-request review / review (pull_request) Successful in 4m11s
Build and Push Attic Cache / test (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Has been skipped
c7b85e3625
- Replace commented-out line with explicit enable = false
- Prevents accidental re-enablement during future edits
- system76-power-daemon is not enabled on electra, so power-profiles-daemon is safe
Author
Owner

All findings have been addressed. The latest automated review shows:

  • 0 blocking findings
  • 0 important findings
  • 0 suggestions

The remaining "Requires further work" verdict is due to a transient nix flake check failure on the CI infrastructure ("Resource temporarily unavailable"), not a configuration issue. nix flake check passes locally.

The questions raised are:

  1. Session routing for cosmic-greeter - handled automatically by the greeter module
  2. Wallpaper asset - home/assets/nimmo-wallpaper.png is committed to the repository and tracked

The PR is ready for final review.

All findings have been addressed. The latest automated review shows: - 0 blocking findings - 0 important findings - 0 suggestions The remaining "Requires further work" verdict is due to a transient `nix flake check` failure on the CI infrastructure ("Resource temporarily unavailable"), not a configuration issue. `nix flake check` passes locally. The questions raised are: 1. Session routing for cosmic-greeter - handled automatically by the greeter module 2. Wallpaper asset - `home/assets/nimmo-wallpaper.png` is committed to the repository and tracked The PR is ready for final review.
nimmo merged commit 8049bce83c into main 2026-07-25 16:16:59 +01:00
nimmo deleted branch feat/cosmic-desktop-test 2026-07-25 16:17:00 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!95
No description provided.