mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-19 21:38:07 -04:00
- Replace 'Extra options' with greetd and getty autologin examples - Add bash/zsh and fish variants for getty autologin - Add link to Nix Module Options reference - Clarify addLoginEntry only has effect when a DM is configured
68 lines
1.7 KiB
Nix
68 lines
1.7 KiB
Nix
self: {
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.programs.mango;
|
|
in {
|
|
options = {
|
|
programs.mango = {
|
|
enable = lib.mkEnableOption "mango, a wayland compositor based on dwl";
|
|
addLoginEntry = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Whether to add a login entry to the display manager for mango. Only has effect if a display manager is configured (e.g. SDDM, GDM via `services.displayManager`).";
|
|
};
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = self.packages.${pkgs.stdenv.hostPlatform.system}.mango;
|
|
description = "The mango package to use";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages =
|
|
[
|
|
cfg.package
|
|
];
|
|
|
|
xdg.portal = {
|
|
enable = lib.mkDefault true;
|
|
|
|
config = {
|
|
mango = {
|
|
default = [
|
|
"gtk"
|
|
];
|
|
# except those
|
|
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
|
"org.freedesktop.impl.portal.ScreenCast" = ["wlr"];
|
|
"org.freedesktop.impl.portal.ScreenShot" = ["wlr"];
|
|
|
|
# wlr does not have this interface
|
|
"org.freedesktop.impl.portal.Inhibit" = [];
|
|
};
|
|
};
|
|
extraPortals = with pkgs; [
|
|
xdg-desktop-portal-wlr
|
|
xdg-desktop-portal-gtk
|
|
];
|
|
|
|
wlr.enable = lib.mkDefault true;
|
|
|
|
configPackages = [cfg.package];
|
|
};
|
|
|
|
security.polkit.enable = lib.mkDefault true;
|
|
|
|
programs.xwayland.enable = lib.mkDefault true;
|
|
|
|
services = {
|
|
displayManager.sessionPackages = lib.mkIf cfg.addLoginEntry [ cfg.package ];
|
|
|
|
graphical-desktop.enable = lib.mkDefault true;
|
|
};
|
|
};
|
|
}
|