-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home-cursor: modernize #6492
base: master
Are you sure you want to change the base?
home-cursor: modernize #6492
Conversation
db7301a
to
a57eb96
Compare
79c7a05
to
ec5280c
Compare
See 797fbbf for a prior example of introducing an |
modules/config/home-cursor.nix
Outdated
@@ -46,6 +50,14 @@ let | |||
''; | |||
}; | |||
|
|||
doticons = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doticons = { | |
dotIcons = { |
modules/config/home-cursor.nix
Outdated
@@ -46,6 +50,14 @@ let | |||
''; | |||
}; | |||
|
|||
doticons = { | |||
enable = mkEnableOption '' | |||
doticons config generation for {option}`home.pointerCursor` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doticons config generation for {option}`home.pointerCursor` | |
`.icons` config generation for {option}`home.pointerCursor` |
ec5280c
to
4378fc5
Compare
4378fc5
to
df5bd38
Compare
Sorry, I've been slow to respond because I've been thinking through the silent But, maybe this is a good approach to not confuse / burden users with internal details and only new configurations have to deal with the new schema... just worried about tech debt longterm if we have to gate every change and keep it backwards compatible like that. |
The tech debt is great in my opinion too. See https://github.com/catppuccin/nix/blob/b1ff2a638afa827f1473498190a2c1cae1cf41cf/modules/home-manager/swaylock.nix#L13-L26. I see the point of |
👍 this would be my expectation, and the easiest way to on-board users onto the new options.
You can (and you should), much the same NixOS does it: support the legacy option for one release, while deprecating it loudly, and removing it at the next branch-off. Given that home manager follows NixOS' release schedule and |
Yes, sorry if I wasn't clear. I meant I'd like a loud deprecation with a stable release support. But, not gate everything silently forever with I think the main thing we want here is a warning when we detect an option default priority of null for the Something like this? Not sure if we need to even check that closely or we can just check for null. options.enable.highestPrio == (lib.mkOptionDefault null).priority |
Since its a submodule you cannot access outside of the submodule the |
df5bd38
to
50aba5b
Compare
@@ -28,11 +44,11 @@ | |||
}; | |||
}; | |||
|
|||
home-cursor-legacy-disabled = { ... }: { | |||
home-cursor-disabled = { ... }: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was supposed to be a test that expects the warning with a new one created that doesn't throw the warning when disabled properly.
@@ -1,8 +1,24 @@ | |||
{ | |||
# Ensure backwards compatibility with existing configs | |||
home-cursor-legacy = { realPkgs, ... }: { | |||
home-cursor-legacy = { ... }: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was supposed to be the test that works with setting a config without enable and threw a warning that the behavior was deprecated
Description
Added the
.enable
pattern tohome.pointerCursor
for the selfish reason that is https://github.com/catppuccin/nix/blob/24dac16e6babd41961d985eef3dce6a30dab2e91/modules/home-manager/cursors.nix#L26-L27.And made the
.icons
directory "toggleable" viahome.pointerCursor.doticons.enable
. Which in my opinion is easier than writing:And removing the top-level
with lib
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
or
nix build --reference-lock-file flake.lock ./tests#test-all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC