2023-07-15 17:15:38 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-05-15 15:35:15 +00:00
|
|
|
let
|
2023-07-15 17:15:38 +00:00
|
|
|
cfg = config.programs.river;
|
|
|
|
in {
|
|
|
|
options.programs.river = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "river, a dynamic tiling Wayland compositor";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
package = lib.mkPackageOption pkgs "river" {
|
2024-01-02 11:29:13 +00:00
|
|
|
nullable = true;
|
|
|
|
extraDescription = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
Set to `null` to not add any River package to your path.
|
|
|
|
This should be done if you want to use the Home Manager River module to install River.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
extraPackages = lib.mkOption {
|
|
|
|
type = with lib.types; listOf package;
|
2023-07-15 17:15:38 +00:00
|
|
|
default = with pkgs; [
|
|
|
|
swaylock
|
|
|
|
foot
|
|
|
|
dmenu
|
|
|
|
];
|
2024-05-15 15:35:15 +00:00
|
|
|
defaultText = lib.literalExpression ''
|
2023-07-15 17:15:38 +00:00
|
|
|
with pkgs; [ swaylock foot dmenu ];
|
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
example = lib.literalExpression ''
|
2023-07-15 17:15:38 +00:00
|
|
|
with pkgs; [
|
|
|
|
termite rofi light
|
|
|
|
]
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
Extra packages to be installed system wide. See
|
|
|
|
[Common X11 apps used on i3 with Wayland alternatives](https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-x11-apps-used-on-i3-with-wayland-alternatives)
|
|
|
|
for a list of useful software.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config =
|
2024-05-15 15:35:15 +00:00
|
|
|
lib.mkIf cfg.enable (lib.mkMerge [
|
2023-07-15 17:15:38 +00:00
|
|
|
{
|
2024-05-15 15:35:15 +00:00
|
|
|
environment.systemPackages = lib.optional (cfg.package != null) cfg.package ++ cfg.extraPackages;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
# To make a river session available if a display manager like SDDM is enabled:
|
2024-05-15 15:35:15 +00:00
|
|
|
services.displayManager.sessionPackages = lib.optionals (cfg.package != null) [ cfg.package ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
|
2024-05-15 15:35:15 +00:00
|
|
|
xdg.portal.config.river.default = lib.mkDefault [ "wlr" "gtk" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
}
|
|
|
|
(import ./wayland-session.nix { inherit lib pkgs; })
|
|
|
|
]);
|
|
|
|
|
|
|
|
meta.maintainers = with lib.maintainers; [ GaetanLepage ];
|
|
|
|
}
|