Skip to content

vicinae: support Home Manager module alongside upstream module#2068

Merged
trueNAHO merged 8 commits intonix-community:masterfrom
rwxae:vicinae-official-hm-support
Jan 5, 2026
Merged

vicinae: support Home Manager module alongside upstream module#2068
trueNAHO merged 8 commits intonix-community:masterfrom
rwxae:vicinae-official-hm-support

Conversation

@rwxae
Copy link
Copy Markdown
Member

@rwxae rwxae commented Dec 6, 2025

Description

Adds support for official home-manager options for vicinae (configured via programs.vicinae instead of services.vicinae).

Official options for vicinae in home-manager were added in nix-community/home-manager#8093.

As stated by the author, these options should work the same way:

The code is mostly verbatim from vicinaehq/vicinae@main/nix/vicinae.nix
with the main difference that I moved the logic for packaging extensions into the module itself.

This is not a breaking change, users of the options that come from vicinae flake don't lose anything.

I'm welcome to hear any feedback.

Thank you for this amazing tool!

Closes: #2076


@stylix-automation stylix-automation bot added topic: home-manager Home Manager target topic: modules /modules/ subsystem labels Dec 6, 2025
@stylix-automation stylix-automation bot requested a review from 0xda157 December 6, 2025 00:21
@rwxae rwxae force-pushed the vicinae-official-hm-support branch from b6cf684 to 34ea4a0 Compare December 6, 2025 00:23
0xda157
0xda157 previously requested changes Dec 6, 2025
Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

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

a testbed for the home-manager options should be added

Comment thread modules/vicinae/hm.nix Outdated
@stylix-automation stylix-automation bot added the topic: testbed Testbed changes label Dec 6, 2025
@stylix-automation stylix-automation bot requested a review from 0xda157 December 6, 2025 01:13
Comment thread modules/vicinae/testbeds/vicinae-integrated.nix
@rwxae
Copy link
Copy Markdown
Member Author

rwxae commented Dec 6, 2025

Applied all suggested improvements, awaiting a review :)

Comment thread modules/vicinae/hm.nix Outdated
Comment thread modules/vicinae/testbeds/vicinae-integrated.nix
@rwxae rwxae requested a review from trueNAHO December 6, 2025 22:00
@rwxae
Copy link
Copy Markdown
Member Author

rwxae commented Dec 6, 2025

I've been looking at other examples to better understand how stylix works. And looks like there is no need to check for presence of viciane in programs. It is always going to be true since home-manager provides this option. This check is only needed if the options come from external flake (e.g. zen-browser or vicinae-standalone).

So maybe, a final implementation for eachConfig should be something like this to avoid any confusion:

      eachConfig =
        config:
        let
          finalConfig = {
            vicinae = config;
          };
        in
        {
          services = lib.optionalAttrs (options.services ? vicinae) finalConfig;
          programs = finalConfig;
        };

What do you think?

@0xda157
Copy link
Copy Markdown
Contributor

0xda157 commented Dec 7, 2025

this should be merged after nix-community/home-manager#8313 is merged (if it isn't rejected).

@0xda157 0xda157 marked this pull request as draft December 7, 2025 05:31
@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Dec 10, 2025
@0xda157
Copy link
Copy Markdown
Contributor

0xda157 commented Dec 26, 2025

I'd be fine with merging this as, because it seems that nix-community/home-manager#8313 isn't likely to be merged soon.


I've been looking at other examples to better understand how stylix works. And looks like there is no need to check for presence of viciane in programs. It is always going to be true since home-manager provides this option. This check is only needed if the options come from external flake (e.g. zen-browser or vicinae-standalone).

So maybe, a final implementation for eachConfig should be something like this to avoid any confusion:

      eachConfig =
        config:
        let
          finalConfig = {
            vicinae = config;
          };
        in
        {
          services = lib.optionalAttrs (options.services ? vicinae) finalConfig;
          programs = finalConfig;
        };

What do you think?

that would break compatibility with older home-manager version, but that is fine as stylix only supports the most recent hm commit (on unstable).

@0xda157 0xda157 marked this pull request as ready for review December 26, 2025 21:03
Copy link
Copy Markdown
Member

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

I'd be fine with merging this as, because it seems that nix-community/home-manager#8313 isn't likely to be merged soon.

Yes, this PR LGTM.

@rwxae, could you resolve the merge conflicts?

@rwxae
Copy link
Copy Markdown
Member Author

rwxae commented Jan 5, 2026

@trueNAHO, fine, I'll do it!

@trueNAHO trueNAHO added the backport: release-25.11 To be backported to the release-25.11 stable branch label Jan 5, 2026
@stylix-automation stylix-automation bot added topic: documentation Documentation additions or improvements topic: dependencies Dependency updates labels Jan 5, 2026
@stylix-automation stylix-automation bot added topic: nixos NixOS target topic: darwin nix-darwin target topic: droid Nix-on-Droid target topic: overlay Overlay changes topic: ci /.github/ subsystem topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem labels Jan 5, 2026
@rwxae
Copy link
Copy Markdown
Member Author

rwxae commented Jan 5, 2026

I am so bad at git

@rwxae rwxae force-pushed the vicinae-official-hm-support branch from 38adba0 to 0d2fa16 Compare January 5, 2026 19:03
@trueNAHO trueNAHO dismissed 0xda157’s stale review January 5, 2026 22:37

Implied approval by the following statement:

I'd be fine with merging this as, because it seems that nix-community/home-manager#8313 isn't likely to be merged soon.

@trueNAHO trueNAHO merged commit a4406d9 into nix-community:master Jan 5, 2026
4 checks passed
@trueNAHO trueNAHO changed the title vicinae: add support for official home-manager options vicinae: support Home Manager module alongside upstream module Jan 5, 2026
@stylix-automation
Copy link
Copy Markdown
Contributor

Backport failed for release-25.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.11
git worktree add -d .worktree/backport-2068-to-release-25.11 origin/release-25.11
cd .worktree/backport-2068-to-release-25.11
git switch --create backport-2068-to-release-25.11
git cherry-pick -x a4406d9799d002c41296c72378a1094a8fc9aa1b

viluon pushed a commit to viluon/stylix that referenced this pull request Jan 6, 2026
…ommunity#2068)

Support the Home Manager module via programs.vicinae alongside the
upstream module's services.vicinae namespace.

Unifying both modules is continued in [1] ("vicinae: move from programs
to services").

[1]: nix-community/home-manager#8313

Closes: nix-community#2076
Link: nix-community#2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9)
viluon pushed a commit to viluon/stylix that referenced this pull request Jan 6, 2026
…ommunity#2068)

Support the Home Manager module via programs.vicinae alongside the
upstream module's services.vicinae namespace.

Unifying both modules is continued in [1] ("vicinae: move from programs
to services").

[1]: nix-community/home-manager#8313

Closes: nix-community#2076
Link: nix-community#2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9)
viluon pushed a commit to viluon/stylix that referenced this pull request Jan 6, 2026
…ommunity#2068)

Support the Home Manager module via programs.vicinae alongside the
upstream module's services.vicinae namespace.

Unifying both modules is continued in [1] ("vicinae: move from programs
to services").

[1]: nix-community/home-manager#8313

Closes: nix-community#2076
Link: nix-community#2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9)
viluon pushed a commit to viluon/stylix that referenced this pull request Jan 6, 2026
…ommunity#2068)

Support the Home Manager module via programs.vicinae alongside the
upstream module's services.vicinae namespace.

Unifying both modules is continued in [1] ("vicinae: move from programs
to services").

[1]: nix-community/home-manager#8313

Closes: nix-community#2076
Link: nix-community#2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9)
trueNAHO pushed a commit that referenced this pull request Jan 8, 2026
Support the Home Manager module via programs.vicinae alongside the
upstream module's services.vicinae namespace.

Unifying both modules is continued in [1] ("vicinae: move from programs
to services").

[1]: nix-community/home-manager#8313

Closes: #2076
Link: #2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: release-25.11 To be backported to the release-25.11 stable branch status: merge conflict Merge conflict topic: ci /.github/ subsystem topic: darwin nix-darwin target topic: dependencies Dependency updates topic: documentation Documentation additions or improvements topic: droid Nix-on-Droid target topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: home-manager Home Manager target topic: modules /modules/ subsystem topic: nixos NixOS target topic: overlay Overlay changes topic: stylix /stylix/ subsystem topic: testbed Testbed changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vicinae: Incorrect option name for HM 25.11

3 participants