Skip to content

nixos/cosmic-greeter: init; nixos/cosmic: init#392837

Merged
JohnRTitor merged 3 commits intoNixOS:masterfrom
thefossguy:cosmic-modules-init
Mar 31, 2025
Merged

nixos/cosmic-greeter: init; nixos/cosmic: init#392837
JohnRTitor merged 3 commits intoNixOS:masterfrom
thefossguy:cosmic-modules-init

Conversation

@thefossguy
Copy link
Copy Markdown
Member

@thefossguy thefossguy commented Mar 24, 2025

Initialize the cosmic modules so the state of broken-ness (or not) of any packages in nixpkgs can be tested.

This will help test the packages and bring out bugs like following:

Mar 25 01:18:22 matsya cosmic-session[1923]: thread 'main' panicked at 'failed to start cosmic-idle': src/main.rs:560
[---snip---]
Mar 25 01:18:23 matsya .cosmic-comp-wrapped[2045]: Unable to parse your locale: ParserError(InvalidLanguage)
Mar 25 01:18:23 matsya .cosmic-comp-wrapped[2045]: Failed to read config 'workspaces'
[---snip---]
Mar 25 01:18:23 matsya .cosmic-comp-wrapped[2045]: shortcuts custom config error: GetKey("custom", Os { code: 2, kind: NotFound, message: "No such file or directory" })

Closes #369113.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 24, 2025
@thefossguy
Copy link
Copy Markdown
Member Author

Closes #369113.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 24, 2025
@nrabulinski
Copy link
Copy Markdown
Member

If you're copying @lilyinstarlight's work verbatim, at least have the dignity of adding a Co-authored-by

@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Mar 24, 2025
Copy link
Copy Markdown
Contributor

@nyabinary nyabinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title should probably be named as nixos/cosmic-greeter: init; nixos/cosmic: init
Furthermore, please credit @lilyinstarlight as many others have said :P

@thefossguy
Copy link
Copy Markdown
Member Author

thefossguy commented Mar 25, 2025

If you're copying @lilyinstarlight's work verbatim, at least have the dignity of adding a Co-authored-by

You don't need to attack anyone to get your point across. Could have mentioned the same thing without assuming I'm a bad guy. My libcosmicAppHook PR was the first to attribute Lily so don't paint me as a bad guy. The earlier PRs from me did not attribute Lily because I'm not at all familiar with software copyrights and didn't know how to do it properly. I asked Lily how the "header" should look like and it resulted in this.

I woke up and the first thing I read about this PR is feedback in form of accusation some good ol' character assassination. :/
I might be an idiot in but I'm not a malicious actor.

@thefossguy thefossguy changed the title Initialize cosmic modules nixos/cosmic-greeter: init; nixos/cosmic: init Mar 25, 2025
@thefossguy thefossguy force-pushed the cosmic-modules-init branch 2 times, most recently from 023e0d2 to c07693c Compare March 25, 2025 04:21
@thefossguy
Copy link
Copy Markdown
Member Author

@HeitorAugustoLN @nyabinary added comments attributing code to Lily and added an option in the cosmic-greeter and cosmic modules to configure the greeter package used.

@ahoneybun
Copy link
Copy Markdown
Contributor

@ALL let's take a step back on the replies about the lack of credit to Lily a little bit. It is possible that @thefossguy just forgot to add it in this PR which is a simple mistake.

@thefossguy since the credit was added for this PR I think everyone expected it to also be included in this PR as well which caused the reaction.

@thefossguy
Copy link
Copy Markdown
Member Author

Resolved a few suggestions which I have made modifications for locally. Waiting on the documentation one for clarification so I can push.

@thefossguy thefossguy force-pushed the cosmic-modules-init branch from c07693c to 7750fd6 Compare March 25, 2025 20:03
@thefossguy
Copy link
Copy Markdown
Member Author

Pushed with all requested changes addressed.

@thefossguy thefossguy force-pushed the cosmic-modules-init branch from 7750fd6 to d5e6420 Compare March 25, 2025 20:06
@nyabinary
Copy link
Copy Markdown
Contributor

Can I also be added as a maintainer btw? :3

@thefossguy thefossguy force-pushed the cosmic-modules-init branch from d5e6420 to 6a752cc Compare March 26, 2025 04:52
@thefossguy
Copy link
Copy Markdown
Member Author

@nyabinary done :)

@thefossguy thefossguy force-pushed the cosmic-modules-init branch from 6a752cc to f2d3271 Compare March 26, 2025 06:06
@thefossguy
Copy link
Copy Markdown
Member Author

Making sure my changes incorporating services.graphical-desktop.enable doesn't break anything.

@thefossguy thefossguy marked this pull request as draft March 30, 2025 09:10
@thefossguy thefossguy force-pushed the cosmic-modules-init branch from 652e3e2 to 68701d5 Compare March 30, 2025 10:02
@thefossguy thefossguy marked this pull request as ready for review March 30, 2025 10:03
@github-actions github-actions bot added 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation labels Mar 30, 2025
@thefossguy
Copy link
Copy Markdown
Member Author

Final push addresses almost all review comments. Please let me know if I missed anything.

@thefossguy thefossguy requested a review from JohnRTitor March 30, 2025 10:19
@thefossguy thefossguy force-pushed the cosmic-modules-init branch from 0b0e4fe to 64ce112 Compare March 30, 2025 19:06
@thefossguy
Copy link
Copy Markdown
Member Author

Pushed commits addressing the recent reviews. Let me know if I missed anything.

Copy link
Copy Markdown
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM.
Good job everyone!

@JohnRTitor
Copy link
Copy Markdown
Member

Merging, we do want some NixOS tests though, at some point, once it gets stable enough.

@JohnRTitor JohnRTitor merged commit 2a7180b into NixOS:master Mar 31, 2025
33 of 35 checks passed
@sebastianrasor
Copy link
Copy Markdown
Contributor

https://github.com/thefossguy/nixpkgs/blob/a793ee3962cf3be3d0e9ed1022147ea9cd34eea9/nixos/modules/services/desktop-managers/cosmic.nix#L131-L140

I don't think these "good to have defaults" should be included. For example, Avahi adds nearly a whole watt of idle usage to my system. I think it should be up to end-users to explicitly enable each of these "good to have" options if they'd like to have them enabled, rather than choosing to enable it for them because you think they're "good to have."

@JohnRTitor
Copy link
Copy Markdown
Member

JohnRTitor commented Apr 1, 2025

These options are there (in also Cinnamon, Pantheon, Mate), so most features out of the box works properly for everybody.

These are marked with mkDefault, feel free to set them to false.

Copy link
Copy Markdown
Member

@lilyinstarlight lilyinstarlight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies I've been sick and unable to even look at this until now

I'm a bit disappointed that helpful comments were removed when this was copy-pasted from the upstream repository, some required code was not copied, and some home-manager-kludge code was mistakenly copied despite the (removed) comment. I would have probably answered questions if something was unclear, but this was done entirely without contact or coordination

Comment on lines +104 to +108
tray = {
description = "Cosmic Tray Target";
requires = [ "graphical-session-pre.target" ];
};
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a home-manager concern and not a nixpkgs concern and has no business in the nixpkgs repository (which would have been more obvious if the comments weren't removed when copy-pasting)

As the original comment also stated, this was a temporary kludge for home-manager 24.11 which did not have nix-community/home-manager#6332, so this is even extra unnecessary on unstable

services.displayManager.sessionPackages = [ pkgs.cosmic-session ];
services.libinput.enable = true;
services.upower.enable = true;
# Setup PAM authentication for the `cosmic-greeter` user
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is incorrect. This has nothing to do with the cosmic-greeter user and is for screenlocking, as the original comment stated (idk why this comment was changed when this was copied)

createHome = true;
group = "cosmic-greeter";
};
# Setup PAM authentication for the `cosmic-greeter` user
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this has nothing to do with the cosmic-greeter user and idk why this comment was changed when copy-pasting

This is the name of the PAM service that cosmic-greeter uses and so we must configure the service to be present (the PAM NixOS module handles most of the configuration as the user specifies elsewhere, we just provide the name here and have it handle the rest as cosmic-greeter has no special requirements)

@JohnRTitor
Copy link
Copy Markdown
Member

JohnRTitor commented Apr 3, 2025

Could you address the new review comments in another PR?

EDIT: I see that the fix has been merged already, thanks GaetanLeepage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.