programs/gnome-session: update module descriptions and comments

This commit is contained in:
Gabriel Arazas 2024-01-04 17:34:46 +08:00
parent 8169228b0e
commit 74295899be
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -249,9 +249,17 @@ let
* `Service.OOMScoreAdjust=` have different values for different * `Service.OOMScoreAdjust=` have different values for different
components so it isn't included. components so it isn't included.
* Most sandboxing options. Aside from the fact we're dealing with a
systemd user unit, much of them are unnecessary and rarely needed (if
ever like `Service.PrivateTmp=`?) so we didn't set such defaults here.
As you can tell, this module does not provide a framework for the user As you can tell, this module does not provide a framework for the user
to easily compose their own desktop environment. THIS MODULE ALREADY to easily compose their own desktop environment. THIS MODULE ALREADY
DOES A LOT, ALRIGHT! CUT ME SOME SLACK! DOES A LOT, ALRIGHT! CUT ME SOME SLACK!
Take note that the default service configuration is leaning on the
desktop component being a simple type of service like how most NixOS
service modules are deployed.
*/ */
serviceUnit = { serviceUnit = {
script = lib.mkAfter script; script = lib.mkAfter script;
@ -278,8 +286,7 @@ let
# set to this value. # set to this value.
CollectMode = lib.mkForce "inactive-or-failed"; CollectMode = lib.mkForce "inactive-or-failed";
# Some sane unit configurations for systemd-managed desktop # We leave those up to the target units to start the services.
# components.
RefuseManualStart = lib.mkDefault true; RefuseManualStart = lib.mkDefault true;
RefuseManualStop = lib.mkDefault true; RefuseManualStop = lib.mkDefault true;
}; };
@ -386,16 +393,16 @@ let
extraArgs = lib.mkOption { extraArgs = lib.mkOption {
type = with lib.types; listOf str; type = with lib.types; listOf str;
description = '' description = ''
A list of arguments to be added for the session script. A list of arguments from {program}`gnome-session` to be added for the session
script.
::: {.note} ::: {.note}
An argument `--session=<name>` will always be appended into the An argument `--session=<name>` will always be appended into the
script. script.
::: :::
''; '';
default = [ "--systemd" ];
example = [ example = [
"--builtin" "--systemd"
"--disable-acceleration-check" "--disable-acceleration-check"
]; ];
}; };
@ -607,6 +614,8 @@ in
example = lib.literalExpression '' example = lib.literalExpression ''
{ {
"one.foodogsquared.SimpleWay" = { "one.foodogsquared.SimpleWay" = {
fullName = "Simple Way";
description = "A desktop environment featuring Sway window manager.";
components = { components = {
# This unit is intended to start with gnome-session. # This unit is intended to start with gnome-session.
window-manager = { window-manager = {