Files
dotfiles/nix/modules/hyprland/nixos.nix

36 lines
957 B
Nix

{
inputs,
pkgs,
lib,
config,
...
}:
let
cfg = config.modules.Hyprland;
in
{
options.modules.Hyprland = {
enable = lib.mkEnableOption "Hyprland";
};
config = lib.mkIf cfg.enable {
programs.xwayland.enable = true;
programs.hyprland = {
enable = true;
# set the flake package
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
};
}