8 cfg = config.programs.river;
10 options.programs.river = {
11 enable = mkEnableOption (lib.mdDoc "river, a dynamic tiling Wayland compositor");
14 type = with types; nullOr package;
16 defaultText = literalExpression "pkgs.river";
17 description = lib.mdDoc ''
19 Set to `null` to not add any River package to your path.
20 This should be done if you want to use the Home Manager River module to install River.
24 extraPackages = mkOption {
25 type = with types; listOf package;
26 default = with pkgs; [
31 defaultText = literalExpression ''
32 with pkgs; [ swaylock foot dmenu ];
34 example = literalExpression ''
39 description = lib.mdDoc ''
40 Extra packages to be installed system wide. See
41 [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)
42 for a list of useful software.
48 mkIf cfg.enable (mkMerge [
50 environment.systemPackages = optional (cfg.package != null) cfg.package ++ cfg.extraPackages;
52 # To make a river session available if a display manager like SDDM is enabled:
53 services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ];
55 (import ./wayland-session.nix { inherit lib pkgs; })
58 meta.maintainers = with lib.maintainers; [ GaetanLepage ];