mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
nixos/hyprland: format with nixfmt rfc style
(cherry picked from commit 48da44a481
)
This commit is contained in:
parent
1d6577f596
commit
fa4cacd136
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.programs.hyprland;
|
||||
@ -13,29 +18,39 @@ in
|
||||
A configuration file will be generated in {file}`~/.config/hypr/hyprland.conf`.
|
||||
See <https://wiki.hyprland.org> for more information'';
|
||||
|
||||
package = lib.mkPackageOption pkgs "hyprland" {
|
||||
package =
|
||||
lib.mkPackageOption pkgs "hyprland" {
|
||||
extraDescription = ''
|
||||
If the package is not overridable with `enableXWayland`, then the module option
|
||||
{option}`xwayland` will have no effect.
|
||||
'';
|
||||
} // {
|
||||
apply = p: wayland-lib.genFinalPackage p {
|
||||
}
|
||||
// {
|
||||
apply =
|
||||
p:
|
||||
wayland-lib.genFinalPackage p {
|
||||
enableXWayland = cfg.xwayland.enable;
|
||||
};
|
||||
};
|
||||
|
||||
portalPackage = lib.mkPackageOption pkgs "xdg-desktop-portal-hyprland" {
|
||||
portalPackage =
|
||||
lib.mkPackageOption pkgs "xdg-desktop-portal-hyprland" {
|
||||
extraDescription = ''
|
||||
If the package is not overridable with `hyprland`, then the Hyprland package
|
||||
used by the portal may differ from the one set in the module option {option}`package`.
|
||||
'';
|
||||
} // {
|
||||
apply = p: wayland-lib.genFinalPackage p {
|
||||
}
|
||||
// {
|
||||
apply =
|
||||
p:
|
||||
wayland-lib.genFinalPackage p {
|
||||
hyprland = cfg.package;
|
||||
};
|
||||
};
|
||||
|
||||
xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; };
|
||||
xwayland.enable = lib.mkEnableOption "XWayland" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
systemd.setPath.enable = lib.mkEnableOption null // {
|
||||
default = lib.versionOlder cfg.package.version "0.41.2";
|
||||
@ -49,7 +64,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
@ -74,21 +90,26 @@ in
|
||||
enableXWayland = cfg.xwayland.enable;
|
||||
enableWlrPortal = lib.mkDefault false; # Hyprland has its own portal, wlr is not needed
|
||||
})
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule
|
||||
[ "programs" "hyprland" "xwayland" "hidpi" ]
|
||||
"XWayland patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland"
|
||||
)
|
||||
(lib.mkRemovedOptionModule
|
||||
[ "programs" "hyprland" "enableNvidiaPatches" ]
|
||||
"Nvidia patches are no longer needed"
|
||||
)
|
||||
(lib.mkRemovedOptionModule
|
||||
[ "programs" "hyprland" "nvidiaPatches" ]
|
||||
"Nvidia patches are no longer needed"
|
||||
)
|
||||
(lib.mkRemovedOptionModule [
|
||||
"programs"
|
||||
"hyprland"
|
||||
"xwayland"
|
||||
"hidpi"
|
||||
] "XWayland patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland")
|
||||
(lib.mkRemovedOptionModule [
|
||||
"programs"
|
||||
"hyprland"
|
||||
"enableNvidiaPatches"
|
||||
] "Nvidia patches are no longer needed")
|
||||
(lib.mkRemovedOptionModule [
|
||||
"programs"
|
||||
"hyprland"
|
||||
"nvidiaPatches"
|
||||
] "Nvidia patches are no longer needed")
|
||||
];
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ fufexan ];
|
||||
|
Loading…
Reference in New Issue
Block a user