From 0734cfab07a90a34bb91428e24646e5fe78d9e24 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 31 Dec 2024 09:54:37 +0000 Subject: [PATCH] wayland: add module --- modules/modules.nix | 1 + modules/wayland.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 modules/wayland.nix diff --git a/modules/modules.nix b/modules/modules.nix index c5a81b42..3c422eb5 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -417,6 +417,7 @@ let ./systemd.nix ./targets/darwin ./targets/generic-linux.nix + ./wayland.nix ./xresources.nix ./xsession.nix ./misc/nix.nix diff --git a/modules/wayland.nix b/modules/wayland.nix new file mode 100644 index 00000000..9a485c56 --- /dev/null +++ b/modules/wayland.nix @@ -0,0 +1,24 @@ +{ lib, ... }: + +{ + meta.maintainers = [ lib.maintainers.thiagokokada ]; + + options = { + wayland = { + systemd.target = lib.mkOption { + type = lib.types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + The systemd target that will automatically start the graphical Wayland services. + This option is a generalization of individual `systemd.target` or `systemdTarget`, + and affect all Wayland services by default. + + When setting this value to `"sway-session.target"`, + make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`, + otherwise the service may never be started. + ''; + }; + }; + }; +}