0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/services.xserver.desktopManager.surf-display: remove with lib;

This commit is contained in:
Felix Buehler 2024-12-30 14:44:40 +01:00
parent 61ad8be682
commit ee971f5c8f

View file

@ -4,9 +4,6 @@
pkgs,
...
}:
with lib;
let
cfg = config.services.xserver.desktopManager.surf-display;
@ -51,18 +48,18 @@ in
{
options = {
services.xserver.desktopManager.surf-display = {
enable = mkEnableOption "surf-display as a kiosk browser session";
enable = lib.mkEnableOption "surf-display as a kiosk browser session";
defaultWwwUri = mkOption {
type = types.str;
defaultWwwUri = lib.mkOption {
type = lib.types.str;
default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
defaultText = literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"'';
defaultText = lib.literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"'';
example = "https://www.example.com/";
description = "Default URI to display.";
};
inactivityInterval = mkOption {
type = types.int;
inactivityInterval = lib.mkOption {
type = lib.types.int;
default = 300;
example = 0;
description = ''
@ -75,16 +72,16 @@ in
'';
};
screensaverSettings = mkOption {
type = types.separatedString " ";
screensaverSettings = lib.mkOption {
type = lib.types.separatedString " ";
default = "";
description = ''
Screensaver settings, see `man 1 xset` for possible options.
'';
};
pointerButtonMap = mkOption {
type = types.str;
pointerButtonMap = lib.mkOption {
type = lib.types.str;
default = "1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
description = ''
Disable right and middle pointer device click in browser sessions
@ -93,15 +90,15 @@ in
'';
};
hideIdlePointer = mkOption {
type = types.str;
hideIdlePointer = lib.mkOption {
type = lib.types.str;
default = "yes";
example = "no";
description = "Hide idle mouse pointer.";
};
extraConfig = mkOption {
type = types.lines;
extraConfig = lib.mkOption {
type = lib.types.lines;
default = "";
example = ''
# Enforce fixed resolution for all displays (default: not set):
@ -124,7 +121,7 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.displayManager.sessionPackages = [
pkgs.surf-display
];