summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Fullmer <danielrf12@gmail.com>2023-09-07 02:25:38 +0300
committerArtturin <Artturin@artturin.com>2023-09-19 05:17:59 +0300
commit67c5103f409f244ec9de2a21e8094aeea96e0b4e (patch)
tree9990bda56b2b3f6672b06326e4e3f49bba846324
parent54547c5bc74c459c30d60a72091f71edb81ae9ea (diff)
downloadnixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar.gz
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar.bz2
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar.lz
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar.xz
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.tar.zst
nixpkgs-67c5103f409f244ec9de2a21e8094aeea96e0b4e.zip
nixos/gdm: add banner option
This exposes the banner message option in GDM. Some computing
environments have compliance requirements which include displaying a
message to the user before logon.
-rw-r--r--nixos/modules/services/x11/display-managers/gdm.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix
index e6923bcbb56..400e5601dc5 100644
--- a/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixos/modules/services/x11/display-managers/gdm.nix
@@ -97,6 +97,19 @@ in
         type = types.bool;
       };
 
+      banner = mkOption {
+        type = types.nullOr types.lines;
+        default = null;
+        example = ''
+          foo
+          bar
+          baz
+        '';
+        description = lib.mdDoc ''
+          Optional message to display on the login screen.
+        '';
+      };
+
       settings = mkOption {
         type = settingsFormat.type;
         default = { };
@@ -238,6 +251,11 @@ in
         sleep-inactive-ac-timeout = lib.gvariant.mkInt32 0;
         sleep-inactive-battery-timeout = lib.gvariant.mkInt32 0;
       };
+    }] ++ lib.optionals (cfg.gdm.banner != null) [{
+      settings."org/gnome/login-screen" = {
+        banner-message-enable = true;
+        banner-message-text = cfg.gdm.banner;
+      };
     }] ++ [ "${gdm}/share/gdm/greeter-dconf-defaults" ];
 
     # Use AutomaticLogin if delay is zero, because it's immediate.