1
1
Fork 0
nixos/options/custom/desktops/niri/default.nix
Myned 1bb9f42a98
niri: initial module
Signed-off-by: Myned <dev@bjork.tech>
2024-12-23 13:03:34 -05:00

46 lines
1.1 KiB
Nix

{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.desktops.niri;
in {
options.custom.desktops.niri = {
enable = mkOption {default = false;};
xwayland = mkOption {default = true;};
};
config = mkIf cfg.enable {
custom.desktops.niri = mkIf config.custom.full {
binds.enable = true;
input.enable = true;
layout.enable = true;
misc.enable = true;
rules.enable = true;
};
# https://github.com/YaLTeR/niri
# https://github.com/sodiboo/niri-flake
# https://github.com/sodiboo/niri-flake/blob/main/docs.md
programs.niri = {
enable = true;
package = pkgs.niri; # nixpkgs
};
nixpkgs.overlays = [inputs.niri.overlays.niri];
#!! Disabled bundled KDE polkit agent
# https://github.com/sodiboo/niri-flake?tab=readme-ov-file#additional-notes
systemd.user.services.niri-flake-polkit.enable = false;
# Enable rootless Xwayland
custom.services.xwayland-satellite.enable = cfg.xwayland;
home-manager.users.${config.custom.username} = {
programs.niri.package = config.programs.niri.package;
};
};
}