2023-10-02 06:26:11 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2022-09-26 00:37:00 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.kiwmi;
|
|
|
|
|
2022-09-26 06:17:58 +00:00
|
|
|
package = cfg.package.override { extraOptions = cfg.extraOptions; };
|
2022-11-19 03:05:31 +00:00
|
|
|
in
|
|
|
|
{
|
2022-09-26 00:37:00 +00:00
|
|
|
options.programs.kiwmi = {
|
|
|
|
enable = lib.mkEnableOption "Kiwmi, a fully programmable Wayland compositor";
|
|
|
|
package = lib.mkOption {
|
2023-07-27 03:13:39 +00:00
|
|
|
description = "The package containing the {command}`kiwmi` and {command}`kiwmic`.";
|
2022-09-26 00:37:00 +00:00
|
|
|
type = lib.types.package;
|
|
|
|
default = pkgs.kiwmi;
|
|
|
|
};
|
|
|
|
extraOptions = lib.mkOption {
|
|
|
|
description = "Command line arguments passed to Kiwmi.";
|
|
|
|
type = with lib.types; listOf str;
|
|
|
|
default = [ ];
|
|
|
|
defaultText = "[ ]";
|
2022-11-01 04:22:22 +00:00
|
|
|
example = lib.literalExpression ''
|
|
|
|
[ "-c" "./config/kiwmi/init.lua" ]
|
|
|
|
'';
|
2022-09-26 00:37:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ package ];
|
|
|
|
services.xserver.displayManager.sessionPackages = [ package ];
|
|
|
|
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
2022-09-28 00:55:30 +00:00
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
2022-09-26 00:37:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|