vicinae: support Home Manager module alongside upstream module (#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]: https://github.com/nix-community/home-manager/pull/8313

Closes: https://github.com/nix-community/stylix/issues/2076
Link: https://github.com/nix-community/stylix/pull/2068

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit a4406d9799)
This commit is contained in:
Alexander 2026-01-06 01:37:47 +03:00 committed by NAHO
parent 88a052bc68
commit 55380d322f
3 changed files with 31 additions and 15 deletions

View file

@ -5,12 +5,20 @@
...
}:
mkTarget {
config = lib.optionals (options.services ? vicinae) [
(
{ colors, polarity }:
{
services.vicinae = {
config =
let
eachConfig =
config:
lib.genAttrs [ "services" "programs" ] (
source: lib.optionalAttrs (options.${source} ? vicinae) { vicinae = config; }
);
in
[
(
{ colors, polarity }:
eachConfig {
settings.theme.name = "stylix";
themes.stylix = {
meta = {
name = "stylix";
@ -45,14 +53,8 @@ mkTarget {
};
};
};
};
}
)
(
{ opacity }:
{
services.vicinae.settings.window.opacity = opacity.popups;
}
)
];
}
)
({ opacity }: eachConfig { settings.window.opacity = opacity.popups; })
];
}

View file

@ -0,0 +1,14 @@
{ lib, ... }:
{
stylix.testbed.ui = {
graphicalEnvironment = "hyprland";
command.text = "sleep 5 && vicinae open";
};
home-manager.sharedModules = lib.singleton {
programs.vicinae = {
enable = true;
systemd.enable = true;
};
};
}