niri: enable if isGraphical is true
This commit is contained in:
parent
0e43fa97ee
commit
cbcb45221d
1 changed files with 27 additions and 23 deletions
|
@ -7,35 +7,39 @@
|
||||||
inherit (lib.modules) mkForce mkIf;
|
inherit (lib.modules) mkForce mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
|
inherit (config.modules.system) isGraphical;
|
||||||
cfg = config.modules.desktops.niri;
|
cfg = config.modules.desktops.niri;
|
||||||
in {
|
in {
|
||||||
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
|
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
|
||||||
config = mkIf cfg.enable {
|
|
||||||
programs.niri = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.niri;
|
|
||||||
};
|
|
||||||
# The niri module auto enables the gnome keyring,
|
|
||||||
# which is something I direly want to avoid.
|
|
||||||
services.gnome.gnome-keyring.enable = mkForce false;
|
|
||||||
|
|
||||||
# set niri's config location to /etc/niri/config.kdl.
|
config =
|
||||||
environment.etc."niri/config.kdl".source = ./config.kdl;
|
mkIf (cfg.enable
|
||||||
|
|| isGraphical)
|
||||||
|
{
|
||||||
|
programs.niri = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.niri;
|
||||||
|
};
|
||||||
|
# The niri module auto enables the gnome keyring,
|
||||||
|
# which is something I direly want to avoid.
|
||||||
|
services.gnome.gnome-keyring.enable = mkForce false;
|
||||||
|
|
||||||
environment.systemPackages = builtins.attrValues {
|
environment.etc."niri/config.kdl".source = ./config.kdl;
|
||||||
inherit (pkgs) xwayland-satellite avizo;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
environment.systemPackages = builtins.attrValues {
|
||||||
enable = true;
|
inherit (pkgs) xwayland-satellite avizo;
|
||||||
xdgOpenUsePortal = true;
|
};
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
xdg.portal = {
|
||||||
];
|
enable = true;
|
||||||
config = {
|
xdgOpenUsePortal = true;
|
||||||
common.default = ["*"];
|
extraPortals = [
|
||||||
hyprland.default = ["gtk"];
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
common.default = ["*"];
|
||||||
|
hyprland.default = ["gtk"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue