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:
parent
61ad8be682
commit
ee971f5c8f
1 changed files with 15 additions and 18 deletions
|
@ -4,9 +4,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.xserver.desktopManager.surf-display;
|
cfg = config.services.xserver.desktopManager.surf-display;
|
||||||
|
|
||||||
|
@ -51,18 +48,18 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
services.xserver.desktopManager.surf-display = {
|
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 {
|
defaultWwwUri = lib.mkOption {
|
||||||
type = types.str;
|
type = lib.types.str;
|
||||||
default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
|
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/";
|
example = "https://www.example.com/";
|
||||||
description = "Default URI to display.";
|
description = "Default URI to display.";
|
||||||
};
|
};
|
||||||
|
|
||||||
inactivityInterval = mkOption {
|
inactivityInterval = lib.mkOption {
|
||||||
type = types.int;
|
type = lib.types.int;
|
||||||
default = 300;
|
default = 300;
|
||||||
example = 0;
|
example = 0;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -75,16 +72,16 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
screensaverSettings = mkOption {
|
screensaverSettings = lib.mkOption {
|
||||||
type = types.separatedString " ";
|
type = lib.types.separatedString " ";
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Screensaver settings, see `man 1 xset` for possible options.
|
Screensaver settings, see `man 1 xset` for possible options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
pointerButtonMap = mkOption {
|
pointerButtonMap = lib.mkOption {
|
||||||
type = types.str;
|
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";
|
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 = ''
|
description = ''
|
||||||
Disable right and middle pointer device click in browser sessions
|
Disable right and middle pointer device click in browser sessions
|
||||||
|
@ -93,15 +90,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
hideIdlePointer = mkOption {
|
hideIdlePointer = lib.mkOption {
|
||||||
type = types.str;
|
type = lib.types.str;
|
||||||
default = "yes";
|
default = "yes";
|
||||||
example = "no";
|
example = "no";
|
||||||
description = "Hide idle mouse pointer.";
|
description = "Hide idle mouse pointer.";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = lib.mkOption {
|
||||||
type = types.lines;
|
type = lib.types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = ''
|
example = ''
|
||||||
# Enforce fixed resolution for all displays (default: not set):
|
# 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 = [
|
services.displayManager.sessionPackages = [
|
||||||
pkgs.surf-display
|
pkgs.surf-display
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue