diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/x11')
35 files changed, 145 insertions, 119 deletions
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/cde.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/cde.nix index 24ca82fca796..6c7105729cfd 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/cde.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/cde.nix @@ -14,7 +14,7 @@ in { default = with pkgs.xorg; [ xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud ]; - example = literalExample '' + defaultText = literalExpression '' with pkgs.xorg; [ xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud ] @@ -50,7 +50,7 @@ in { security.wrappers = { dtmail = { setgid = true; - owner = "nobody"; + owner = "root"; group = "mail"; source = "${pkgs.cdesktopenv}/bin/dtmail"; }; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix index d201c1a5334b..a0a5873f72fe 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -26,7 +26,7 @@ in sessionPath = mkOption { default = []; type = types.listOf types.package; - example = literalExample "[ pkgs.gnome.gpaste ]"; + example = literalExpression "[ pkgs.gnome.gpaste ]"; description = '' Additional list of packages to be added to the session search path. Useful for GSettings-conditional autostart. @@ -50,7 +50,7 @@ in environment.cinnamon.excludePackages = mkOption { default = []; - example = literalExample "[ pkgs.cinnamon.blueberry ]"; + example = literalExpression "[ pkgs.cinnamon.blueberry ]"; type = types.listOf types.package; description = "Which packages cinnamon should exclude from the default environment"; }; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome.nix index 9bb671adbecf..1e316c379f5b 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -186,7 +186,7 @@ in sessionPath = mkOption { default = []; type = types.listOf types.package; - example = literalExample "[ pkgs.gnome.gpaste ]"; + example = literalExpression "[ pkgs.gnome.gpaste ]"; description = '' Additional list of packages to be added to the session search path. Useful for GNOME Shell extensions or GSettings-conditional autostart. @@ -200,9 +200,11 @@ in internal = true; # this is messy default = defaultFavoriteAppsOverride; type = types.lines; - example = literalExample '' - [org.gnome.shell] - favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ] + example = literalExpression '' + ''' + [org.gnome.shell] + favorite-apps=[ 'firefox.desktop', 'org.gnome.Calendar.desktop' ] + ''' ''; description = "List of desktop files to put as favorite apps into gnome-shell. These need to be installed somehow globally."; }; @@ -242,13 +244,13 @@ in wmCommand = mkOption { type = types.str; description = "The executable of the window manager to use."; - example = "\${pkgs.haskellPackages.xmonad}/bin/xmonad"; + example = literalExpression ''"''${pkgs.haskellPackages.xmonad}/bin/xmonad"''; }; enableGnomePanel = mkOption { type = types.bool; default = true; - example = "false"; + example = false; description = "Whether to enable the GNOME panel in this session."; }; }; @@ -259,20 +261,20 @@ in panelModulePackages = mkOption { default = [ pkgs.gnome.gnome-applets ]; + defaultText = literalExpression "[ pkgs.gnome.gnome-applets ]"; type = types.listOf types.path; description = '' Packages containing modules that should be made available to <literal>gnome-panel</literal> (usually for applets). If you're packaging something to use here, please install the modules in <literal>$out/lib/gnome-panel/modules</literal>. ''; - example = literalExample "[ pkgs.gnome.gnome-applets ]"; }; }; }; environment.gnome.excludePackages = mkOption { default = []; - example = literalExample "[ pkgs.gnome.totem ]"; + example = literalExpression "[ pkgs.gnome.totem ]"; type = types.listOf types.package; description = "Which packages gnome should exclude from the default environment"; }; @@ -370,7 +372,13 @@ in services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center xdg.portal.enable = true; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal.extraPortals = [ + pkgs.xdg-desktop-portal-gnome + (pkgs.xdg-desktop-portal-gtk.override { + # Do not build portals that we already have. + buildPortalsInGnome = false; + }) + ]; # Harmonize Qt5 application style and also make them use the portal for file chooser dialog. qt5 = { diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/kodi.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/kodi.nix index af303d6fb279..b853c94d6fd4 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/kodi.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/kodi.nix @@ -18,8 +18,8 @@ in package = mkOption { type = types.package; default = pkgs.kodi; - defaultText = "pkgs.kodi"; - example = "pkgs.kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])"; + defaultText = literalExpression "pkgs.kodi"; + example = literalExpression "pkgs.kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])"; description = '' Package that should be used for Kodi. ''; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/lxqt.nix index 71dfad5c7ca0..720985ba0d94 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/lxqt.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/lxqt.nix @@ -19,7 +19,7 @@ in environment.lxqt.excludePackages = mkOption { default = []; - example = literalExample "[ pkgs.lxqt.qterminal ]"; + example = literalExpression "[ pkgs.lxqt.qterminal ]"; type = types.listOf types.package; description = "Which LXQt packages to exclude from the default environment"; }; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix index 19ab9edb7324..f8f47a061452 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix @@ -35,7 +35,7 @@ in environment.mate.excludePackages = mkOption { default = []; - example = literalExample "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]"; + example = literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]"; type = types.listOf types.package; description = "Which MATE packages to exclude from the default environment"; }; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix index 887d6c91e83b..112f493b811c 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -43,7 +43,7 @@ in sessionPath = mkOption { default = []; type = types.listOf types.package; - example = literalExample "[ pkgs.gnome.gpaste ]"; + example = literalExpression "[ pkgs.gnome.gpaste ]"; description = '' Additional list of packages to be added to the session search path. Useful for GSettings-conditional autostart. @@ -86,7 +86,7 @@ in environment.pantheon.excludePackages = mkOption { default = []; - example = literalExample "[ pkgs.pantheon.elementary-camera ]"; + example = literalExpression "[ pkgs.pantheon.elementary-camera ]"; type = types.listOf types.package; description = "Which packages pantheon should exclude from the default environment"; }; @@ -219,6 +219,7 @@ in ] config.environment.pantheon.excludePackages); programs.evince.enable = mkDefault true; + programs.evince.package = pkgs.pantheon.evince; programs.file-roller.enable = mkDefault true; # Settings from elementary-default-settings diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix index d8dc2675f068..11cb4d3b8a95 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -13,7 +13,6 @@ let pulseaudio = config.hardware.pulseaudio; pactl = "${getBin pulseaudio.package}/bin/pactl"; - startplasma-x11 = "${getBin plasma5.plasma-workspace}/bin/startplasma-x11"; sed = "${getBin pkgs.gnused}/bin/sed"; gtkrc2 = writeText "gtkrc-2.0" '' @@ -136,9 +135,6 @@ let fi fi - '' - + '' - exec "${startplasma-x11}" ''; in @@ -172,6 +168,12 @@ in disabled by default. ''; }; + + useQtScaling = mkOption { + type = types.bool; + default = false; + description = "Enable HiDPI scaling in Qt."; + }; }; }; @@ -183,6 +185,7 @@ in config = mkMerge [ (mkIf cfg.enable { + # Seed our configuration into nixos-generate-config system.nixos-generate-config.desktopConfiguration = ['' # Enable the Plasma 5 Desktop Environment. @@ -190,11 +193,7 @@ in services.xserver.desktopManager.plasma5.enable = true; '']; - services.xserver.desktopManager.session = singleton { - name = "plasma5"; - bgSupport = true; - start = startplasma; - }; + services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-workspace ]; security.wrappers = { kcheckpass = @@ -264,6 +263,7 @@ in kwallet-pam kwalletmanager kwayland + kwayland-integration kwidgetsaddons kxmlgui kxmlrpcclient @@ -319,6 +319,10 @@ in qtvirtualkeyboard pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + + elisa + gwenview + okular ] # Phonon audio backend @@ -342,6 +346,8 @@ in environment.etc."X11/xkb".source = xcfg.xkbDir; + environment.sessionVariables.PLASMA_USE_QT_SCALING = mkIf cfg.useQtScaling "1"; + # Enable GTK applications to load SVG icons services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; @@ -384,6 +390,7 @@ in # Update the start menu for each user that is currently logged in system.userActivationScripts.plasmaSetup = activationScript; + services.xserver.displayManager.setupCommands = startplasma; nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true; }) diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/surf-display.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/surf-display.nix index 9aeb0bbd2a88..4b5a04f988ba 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/surf-display.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/surf-display.nix @@ -50,6 +50,7 @@ in { defaultWwwUri = mkOption { type = types.str; default = "${pkgs.surf-display}/share/surf-display/empty-page.html"; + defaultText = literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"''; example = "https://www.example.com/"; description = "Default URI to display."; }; @@ -57,7 +58,7 @@ in { inactivityInterval = mkOption { type = types.int; default = 300; - example = "0"; + example = 0; description = '' Setting for internal inactivity timer to restart surf-display if the user goes inactive/idle to get a fresh session for the next user of diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix index bbfdea2225b5..25276e1d649e 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -49,7 +49,7 @@ in thunarPlugins = mkOption { default = []; type = types.listOf types.package; - example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]"; + example = literalExpression "[ pkgs.xfce.thunar-archive-plugin ]"; description = '' A list of plugin that should be installed with Thunar. ''; diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix index f76db278a927..3424ee1b0e11 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix @@ -14,8 +14,8 @@ in services.xserver.desktopManager.xterm.enable = mkOption { type = types.bool; - default = (versionOlder config.system.stateVersion "19.09") && xSessionEnabled; - defaultText = if versionOlder config.system.stateVersion "19.09" then "config.services.xserver.enable" else "false"; + default = versionOlder config.system.stateVersion "19.09" && xSessionEnabled; + defaultText = literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;''; description = "Enable a xterm terminal as a desktop manager."; }; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix index 584dfb63c4dc..7fc8db95a485 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix @@ -217,7 +217,7 @@ in session = mkOption { default = []; - example = literalExample + example = literalExpression '' [ { manage = "desktop"; name = "xterm"; @@ -305,9 +305,7 @@ in execCmd = mkOption { type = types.str; - example = literalExample '' - "''${pkgs.lightdm}/bin/lightdm" - ''; + example = literalExpression ''"''${pkgs.lightdm}/bin/lightdm"''; description = "Command to start the display manager."; }; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix index 3df576038a9f..e036c684c886 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix @@ -6,6 +6,8 @@ let cfg = config.services.xserver.displayManager; gdm = pkgs.gnome.gdm; + settingsFormat = pkgs.formats.ini { }; + configFile = settingsFormat.generate "custom.conf" cfg.gdm.settings; xSessionWrapper = if (cfg.setupCommands == "") then null else pkgs.writeScript "gdm-x-session-wrapper" '' @@ -24,7 +26,6 @@ let load-module module-udev-detect load-module module-native-protocol-unix load-module module-default-device-restore - load-module module-rescue-streams load-module module-always-sink load-module module-intended-roles load-module module-suspend-on-idle @@ -105,6 +106,18 @@ in type = types.bool; }; + settings = mkOption { + type = settingsFormat.type; + default = { }; + example = { + debug.enable = true; + }; + description = '' + Options passed to the gdm daemon. + See <link xlink:href="https://help.gnome.org/admin/gdm/stable/configuration.html.en#daemonconfig">here</link> for supported options. + ''; + }; + }; }; @@ -270,31 +283,26 @@ in # Use AutomaticLogin if delay is zero, because it's immediate. # Otherwise with TimedLogin with zero seconds the prompt is still # presented and there's a little delay. - environment.etc."gdm/custom.conf".text = '' - [daemon] - WaylandEnable=${boolToString cfg.gdm.wayland} - ${optionalString cfg.autoLogin.enable ( - if cfg.gdm.autoLogin.delay > 0 then '' - TimedLoginEnable=true - TimedLogin=${cfg.autoLogin.user} - TimedLoginDelay=${toString cfg.gdm.autoLogin.delay} - '' else '' - AutomaticLoginEnable=true - AutomaticLogin=${cfg.autoLogin.user} - '') - } - - [security] - - [xdmcp] - - [greeter] - - [chooser] - - [debug] - ${optionalString cfg.gdm.debug "Enable=true"} - ''; + services.xserver.displayManager.gdm.settings = { + daemon = mkMerge [ + { WaylandEnable = cfg.gdm.wayland; } + # nested if else didn't work + (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay != 0 ) { + TimedLoginEnable = true; + TimedLogin = cfg.autoLogin.user; + TimedLoginDelay = cfg.gdm.autoLogin.delay; + }) + (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay == 0 ) { + AutomaticLoginEnable = true; + AutomaticLogin = cfg.autoLogin.user; + }) + ]; + debug = mkIf cfg.gdm.debug { + Enable = true; + }; + }; + + environment.etc."gdm/custom.conf".source = configFile; environment.etc."gdm/Xsession".source = config.services.xserver.displayManager.sessionData.wrapper; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix index ecd46a9ee6d2..930ee96b384d 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix @@ -35,7 +35,7 @@ in { package = mkOption { type = types.package; default = pkgs.gnome.gnome-themes-extra; - defaultText = "pkgs.gnome.gnome-themes-extra"; + defaultText = literalExpression "pkgs.gnome.gnome-themes-extra"; description = '' The package path that contains the theme given in the name option. ''; @@ -54,7 +54,7 @@ in { package = mkOption { type = types.package; default = pkgs.papirus-icon-theme; - defaultText = "pkgs.papirus-icon-theme"; + defaultText = literalExpression "pkgs.papirus-icon-theme"; description = '' The package path that contains the icon theme given in the name option. ''; @@ -73,7 +73,7 @@ in { package = mkOption { type = types.package; default = pkgs.capitaine-cursors; - defaultText = "pkgs.capitaine-cursors"; + defaultText = literalExpression "pkgs.capitaine-cursors"; description = '' The package path that contains the cursor theme given in the name option. ''; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix index fe5a16bc60f1..debd4b568bf6 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix @@ -48,7 +48,7 @@ in package = mkOption { type = types.package; default = pkgs.gnome.gnome-themes-extra; - defaultText = "pkgs.gnome.gnome-themes-extra"; + defaultText = literalExpression "pkgs.gnome.gnome-themes-extra"; description = '' The package path that contains the theme given in the name option. ''; @@ -69,7 +69,7 @@ in package = mkOption { type = types.package; default = pkgs.gnome.adwaita-icon-theme; - defaultText = "pkgs.gnome.adwaita-icon-theme"; + defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme"; description = '' The package path that contains the icon theme given in the name option. ''; @@ -90,7 +90,7 @@ in package = mkOption { type = types.package; default = pkgs.gnome.adwaita-icon-theme; - defaultText = "pkgs.gnome.adwaita-icon-theme"; + defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme"; description = '' The package path that contains the cursor theme given in the name option. ''; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix index 41c1b635f5d6..1c9a5f978c54 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix @@ -148,7 +148,7 @@ in background = mkOption { type = types.path; # Manual cannot depend on packages, we are actually setting the default in config below. - defaultText = "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath"; + defaultText = literalExpression "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath"; description = '' The background image or color to use. ''; diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix index d79b3cda2fcc..5a4fad9c4cb1 100644 --- a/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix @@ -113,14 +113,12 @@ in settings = mkOption { type = iniFmt.type; default = { }; - example = '' - { - Autologin = { - User = "john"; - Session = "plasma.desktop"; - }; - } - ''; + example = { + Autologin = { + User = "john"; + Session = "plasma.desktop"; + }; + }; description = '' Extra settings merged in and overwritting defaults in sddm.conf. ''; diff --git a/nixpkgs/nixos/modules/services/x11/extra-layouts.nix b/nixpkgs/nixos/modules/services/x11/extra-layouts.nix index b1c4e04975f9..159bed63e137 100644 --- a/nixpkgs/nixos/modules/services/x11/extra-layouts.nix +++ b/nixpkgs/nixos/modules/services/x11/extra-layouts.nix @@ -93,7 +93,7 @@ in extraLayouts = mkOption { type = types.attrsOf (types.submodule layoutOpts); default = {}; - example = literalExample + example = literalExpression '' { mine = { diff --git a/nixpkgs/nixos/modules/services/x11/imwheel.nix b/nixpkgs/nixos/modules/services/x11/imwheel.nix index 51f72dadbd43..ae990141a502 100644 --- a/nixpkgs/nixos/modules/services/x11/imwheel.nix +++ b/nixpkgs/nixos/modules/services/x11/imwheel.nix @@ -21,15 +21,17 @@ in rules = mkOption { type = types.attrsOf types.str; default = {}; - example = literalExample '' - ".*" = ''' - None, Up, Button4, 8 - None, Down, Button5, 8 - Shift_L, Up, Shift_L|Button4, 4 - Shift_L, Down, Shift_L|Button5, 4 - Control_L, Up, Control_L|Button4 - Control_L, Down, Control_L|Button5 - '''; + example = literalExpression '' + { + ".*" = ''' + None, Up, Button4, 8 + None, Down, Button5, 8 + Shift_L, Up, Shift_L|Button4, 4 + Shift_L, Down, Shift_L|Button5, 4 + Control_L, Up, Control_L|Button4 + Control_L, Down, Control_L|Button5 + '''; + } ''; description = '' Window class translation rules. diff --git a/nixpkgs/nixos/modules/services/x11/picom.nix b/nixpkgs/nixos/modules/services/x11/picom.nix index 977d0fea2192..dbd4b1cefef1 100644 --- a/nixpkgs/nixos/modules/services/x11/picom.nix +++ b/nixpkgs/nixos/modules/services/x11/picom.nix @@ -254,7 +254,7 @@ in { in mkOption { type = topLevel; default = { }; - example = literalExample '' + example = literalExpression '' blur = { method = "gaussian"; size = 10; diff --git a/nixpkgs/nixos/modules/services/x11/redshift.nix b/nixpkgs/nixos/modules/services/x11/redshift.nix index 60d80a28762b..cc9f964754f3 100644 --- a/nixpkgs/nixos/modules/services/x11/redshift.nix +++ b/nixpkgs/nixos/modules/services/x11/redshift.nix @@ -76,7 +76,7 @@ in { package = mkOption { type = types.package; default = pkgs.redshift; - defaultText = "pkgs.redshift"; + defaultText = literalExpression "pkgs.redshift"; description = '' redshift derivation to use. ''; diff --git a/nixpkgs/nixos/modules/services/x11/touchegg.nix b/nixpkgs/nixos/modules/services/x11/touchegg.nix index fab7fac3f017..9d3678e7696d 100644 --- a/nixpkgs/nixos/modules/services/x11/touchegg.nix +++ b/nixpkgs/nixos/modules/services/x11/touchegg.nix @@ -16,7 +16,7 @@ in { package = mkOption { type = types.package; default = pkgs.touchegg; - defaultText = "pkgs.touchegg"; + defaultText = literalExpression "pkgs.touchegg"; description = "touchegg derivation to use."; }; }; diff --git a/nixpkgs/nixos/modules/services/x11/unclutter-xfixes.nix b/nixpkgs/nixos/modules/services/x11/unclutter-xfixes.nix index 71262431b685..0b4d06f640d2 100644 --- a/nixpkgs/nixos/modules/services/x11/unclutter-xfixes.nix +++ b/nixpkgs/nixos/modules/services/x11/unclutter-xfixes.nix @@ -17,7 +17,7 @@ in { description = "unclutter-xfixes derivation to use."; type = types.package; default = pkgs.unclutter-xfixes; - defaultText = "pkgs.unclutter-xfixes"; + defaultText = literalExpression "pkgs.unclutter-xfixes"; }; timeout = mkOption { diff --git a/nixpkgs/nixos/modules/services/x11/unclutter.nix b/nixpkgs/nixos/modules/services/x11/unclutter.nix index 56e30c79d1f1..bdb5fa7b50cd 100644 --- a/nixpkgs/nixos/modules/services/x11/unclutter.nix +++ b/nixpkgs/nixos/modules/services/x11/unclutter.nix @@ -16,7 +16,7 @@ in { package = mkOption { type = types.package; default = pkgs.unclutter; - defaultText = "pkgs.unclutter"; + defaultText = literalExpression "pkgs.unclutter"; description = "unclutter derivation to use."; }; diff --git a/nixpkgs/nixos/modules/services/x11/urxvtd.nix b/nixpkgs/nixos/modules/services/x11/urxvtd.nix index 867ac38a944f..0a0df447f4e1 100644 --- a/nixpkgs/nixos/modules/services/x11/urxvtd.nix +++ b/nixpkgs/nixos/modules/services/x11/urxvtd.nix @@ -19,7 +19,7 @@ in { package = mkOption { default = pkgs.rxvt-unicode; - defaultText = "pkgs.rxvt-unicode"; + defaultText = literalExpression "pkgs.rxvt-unicode"; description = '' Package to install. Usually pkgs.rxvt-unicode. ''; diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/awesome.nix b/nixpkgs/nixos/modules/services/x11/window-managers/awesome.nix index 37a14e34f57e..c6c0c934f9ae 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/awesome.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/awesome.nix @@ -27,7 +27,7 @@ in default = []; type = types.listOf types.package; description = "List of lua packages available for being used in the Awesome configuration."; - example = literalExample "[ pkgs.luaPackages.vicious ]"; + example = literalExpression "[ pkgs.luaPackages.vicious ]"; }; package = mkOption { diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/bspwm.nix b/nixpkgs/nixos/modules/services/x11/window-managers/bspwm.nix index 23cd4f6529a6..ade24061a069 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/bspwm.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/bspwm.nix @@ -14,15 +14,15 @@ in package = mkOption { type = types.package; default = pkgs.bspwm; - defaultText = "pkgs.bspwm"; - example = "pkgs.bspwm-unstable"; + defaultText = literalExpression "pkgs.bspwm"; + example = literalExpression "pkgs.bspwm-unstable"; description = '' bspwm package to use. ''; }; configFile = mkOption { type = with types; nullOr path; - example = "${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"; + example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"''; default = null; description = '' Path to the bspwm configuration file. @@ -34,15 +34,15 @@ in package = mkOption { type = types.package; default = pkgs.sxhkd; - defaultText = "pkgs.sxhkd"; - example = "pkgs.sxhkd-unstable"; + defaultText = literalExpression "pkgs.sxhkd"; + example = literalExpression "pkgs.sxhkd-unstable"; description = '' sxhkd package to use. ''; }; configFile = mkOption { type = with types; nullOr path; - example = "${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"; + example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"''; default = null; description = '' Path to the sxhkd configuration file. diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/clfswm.nix b/nixpkgs/nixos/modules/services/x11/window-managers/clfswm.nix index 5015852db69f..78772c799744 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/clfswm.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/clfswm.nix @@ -13,7 +13,7 @@ in package = mkOption { type = types.package; default = pkgs.lispPackages.clfswm; - defaultText = "pkgs.lispPackages.clfswm"; + defaultText = literalExpression "pkgs.lispPackages.clfswm"; description = '' clfswm package to use. ''; diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/exwm.nix b/nixpkgs/nixos/modules/services/x11/window-managers/exwm.nix index 4b707d398496..b505f720f04c 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/exwm.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/exwm.nix @@ -22,7 +22,7 @@ in loadScript = mkOption { default = "(require 'exwm)"; type = types.lines; - example = literalExample '' + example = '' (require 'exwm) (exwm-enable) ''; @@ -39,8 +39,9 @@ in }; extraPackages = mkOption { type = types.functionTo (types.listOf types.package); - default = self: []; - example = literalExample '' + default = epkgs: []; + defaultText = literalExpression "epkgs: []"; + example = literalExpression '' epkgs: [ epkgs.emms epkgs.magit diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/herbstluftwm.nix b/nixpkgs/nixos/modules/services/x11/window-managers/herbstluftwm.nix index 548097a412d2..354d70c695cb 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/herbstluftwm.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/herbstluftwm.nix @@ -14,7 +14,7 @@ in package = mkOption { type = types.package; default = pkgs.herbstluftwm; - defaultText = "pkgs.herbstluftwm"; + defaultText = literalExpression "pkgs.herbstluftwm"; description = '' Herbstluftwm package to use. ''; diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/i3.nix b/nixpkgs/nixos/modules/services/x11/window-managers/i3.nix index 0ef55d5f2c03..99f9997024fe 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/i3.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/i3.nix @@ -30,8 +30,8 @@ in package = mkOption { type = types.package; default = pkgs.i3; - defaultText = "pkgs.i3"; - example = "pkgs.i3-gaps"; + defaultText = literalExpression "pkgs.i3"; + example = literalExpression "pkgs.i3-gaps"; description = '' i3 package to use. ''; @@ -40,7 +40,7 @@ in extraPackages = mkOption { type = with types; listOf package; default = with pkgs; [ dmenu i3status i3lock ]; - example = literalExample '' + defaultText = literalExpression '' with pkgs; [ dmenu i3status diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/wmderland.nix b/nixpkgs/nixos/modules/services/x11/window-managers/wmderland.nix index a6864a827719..56b692209651 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/wmderland.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/wmderland.nix @@ -28,7 +28,7 @@ in feh rxvt-unicode ]; - example = literalExample '' + defaultText = literalExpression '' with pkgs; [ rofi dunst diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix b/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix index fe8ed3812511..6aa0d5f76f26 100644 --- a/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix +++ b/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix @@ -2,7 +2,7 @@ with lib; let - inherit (lib) mkOption mkIf optionals literalExample; + inherit (lib) mkOption mkIf optionals literalExpression; cfg = config.services.xserver.windowManager.xmonad; ghcWithPackages = cfg.haskellPackages.ghcWithPackages; @@ -42,8 +42,8 @@ in { enable = mkEnableOption "xmonad"; haskellPackages = mkOption { default = pkgs.haskellPackages; - defaultText = "pkgs.haskellPackages"; - example = literalExample "pkgs.haskell.packages.ghc784"; + defaultText = literalExpression "pkgs.haskellPackages"; + example = literalExpression "pkgs.haskell.packages.ghc784"; description = '' haskellPackages used to build Xmonad and other packages. This can be used to change the GHC version used to build @@ -55,8 +55,8 @@ in { extraPackages = mkOption { type = types.functionTo (types.listOf types.package); default = self: []; - defaultText = "self: []"; - example = literalExample '' + defaultText = literalExpression "self: []"; + example = literalExpression '' haskellPackages: [ haskellPackages.xmonad-contrib haskellPackages.monad-logger diff --git a/nixpkgs/nixos/modules/services/x11/xautolock.nix b/nixpkgs/nixos/modules/services/x11/xautolock.nix index 5ce08fce7c43..947d8f4edfb5 100644 --- a/nixpkgs/nixos/modules/services/x11/xautolock.nix +++ b/nixpkgs/nixos/modules/services/x11/xautolock.nix @@ -27,7 +27,8 @@ in locker = mkOption { default = "${pkgs.xlockmore}/bin/xlock"; # default according to `man xautolock` - example = "${pkgs.i3lock}/bin/i3lock -i /path/to/img"; + defaultText = literalExpression ''"''${pkgs.xlockmore}/bin/xlock"''; + example = literalExpression ''"''${pkgs.i3lock}/bin/i3lock -i /path/to/img"''; type = types.str; description = '' @@ -37,7 +38,7 @@ in nowlocker = mkOption { default = null; - example = "${pkgs.i3lock}/bin/i3lock -i /path/to/img"; + example = literalExpression ''"''${pkgs.i3lock}/bin/i3lock -i /path/to/img"''; type = types.nullOr types.str; description = '' @@ -56,7 +57,7 @@ in notifier = mkOption { default = null; - example = "${pkgs.libnotify}/bin/notify-send \"Locking in 10 seconds\""; + example = literalExpression ''"''${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds'"''; type = types.nullOr types.str; description = '' diff --git a/nixpkgs/nixos/modules/services/x11/xserver.nix b/nixpkgs/nixos/modules/services/x11/xserver.nix index ee190ac3cc44..cb620f10b13f 100644 --- a/nixpkgs/nixos/modules/services/x11/xserver.nix +++ b/nixpkgs/nixos/modules/services/x11/xserver.nix @@ -217,7 +217,7 @@ in inputClassSections = mkOption { type = types.listOf types.lines; default = []; - example = literalExample '' + example = literalExpression '' [ ''' Identifier "Trackpoint Wheel Emulation" MatchProduct "ThinkPad USB Keyboard with TrackPoint" @@ -233,7 +233,7 @@ in modules = mkOption { type = types.listOf types.path; default = []; - example = literalExample "[ pkgs.xf86_input_wacom ]"; + example = literalExpression "[ pkgs.xf86_input_wacom ]"; description = "Packages to be added to the module search path of the X server."; }; @@ -351,6 +351,7 @@ in xkbDir = mkOption { type = types.path; default = "${pkgs.xkeyboard_config}/etc/X11/xkb"; + defaultText = literalExpression ''"''${pkgs.xkeyboard_config}/etc/X11/xkb"''; description = '' Path used for -xkbdir xserver parameter. ''; |