aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/x11
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/x11')
-rw-r--r--nixpkgs/nixos/modules/services/x11/colord.nix2
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix205
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/default.nix1
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix6
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix3
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix20
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/default.nix64
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix74
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix2
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix74
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix63
-rw-r--r--nixpkgs/nixos/modules/services/x11/imwheel.nix3
-rw-r--r--nixpkgs/nixos/modules/services/x11/urserver.nix38
-rw-r--r--nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix2
-rw-r--r--nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix30
-rw-r--r--nixpkgs/nixos/modules/services/x11/xserver.nix2
16 files changed, 429 insertions, 160 deletions
diff --git a/nixpkgs/nixos/modules/services/x11/colord.nix b/nixpkgs/nixos/modules/services/x11/colord.nix
index cf113ad2af8..31ccee6aa33 100644
--- a/nixpkgs/nixos/modules/services/x11/colord.nix
+++ b/nixpkgs/nixos/modules/services/x11/colord.nix
@@ -26,7 +26,7 @@ in {
systemd.packages = [ pkgs.colord ];
- environment.etc."tmpfiles.d/colord.conf".source = "${pkgs.colord}/lib/tmpfiles.d/colord.conf";
+ systemd.tmpfiles.packages = [ pkgs.colord ];
users.users.colord = {
isSystemUser = true;
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix
new file mode 100644
index 00000000000..a404143a03d
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix
@@ -0,0 +1,205 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.xserver.desktopManager.cinnamon;
+ serviceCfg = config.services.cinnamon;
+
+ nixos-gsettings-overrides = pkgs.cinnamon.cinnamon-gsettings-overrides.override {
+ extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages;
+ extraGSettingsOverrides = cfg.extraGSettingsOverrides;
+ };
+
+in
+
+{
+ options = {
+ services.cinnamon = {
+ apps.enable = mkEnableOption "Cinnamon default applications";
+ };
+
+ services.xserver.desktopManager.cinnamon = {
+ enable = mkEnableOption "the cinnamon desktop manager";
+
+ sessionPath = mkOption {
+ default = [];
+ example = literalExample "[ pkgs.gnome3.gpaste ]";
+ description = ''
+ Additional list of packages to be added to the session search path.
+ Useful for GSettings-conditional autostart.
+
+ Note that this should be a last resort; patching the package is preferred (see GPaste).
+ '';
+ };
+
+ extraGSettingsOverrides = mkOption {
+ default = "";
+ type = types.lines;
+ description = "Additional gsettings overrides.";
+ };
+
+ extraGSettingsOverridePackages = mkOption {
+ default = [];
+ type = types.listOf types.path;
+ description = "List of packages for which gsettings are overridden.";
+ };
+ };
+
+ environment.cinnamon.excludePackages = mkOption {
+ default = [];
+ example = literalExample "[ pkgs.cinnamon.blueberry ]";
+ type = types.listOf types.package;
+ description = "Which packages cinnamon should exclude from the default environment";
+ };
+
+ };
+
+ config = mkMerge [
+ (mkIf (cfg.enable && config.services.xserver.displayManager.lightdm.enable && config.services.xserver.displayManager.lightdm.greeters.gtk.enable) {
+ services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = mkDefault (builtins.readFile "${pkgs.cinnamon.mint-artwork}/etc/lightdm/lightdm-gtk-greeter.conf.d/99_linuxmint.conf");
+ })
+
+ (mkIf cfg.enable {
+ services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ];
+
+ services.xserver.displayManager.sessionCommands = ''
+ if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then
+ true
+ ${concatMapStrings (p: ''
+ if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
+ fi
+
+ if [ -d "${p}/lib/girepository-1.0" ]; then
+ export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
+ fi
+ '') cfg.sessionPath}
+ fi
+ '';
+
+ # Default services
+ hardware.bluetooth.enable = mkDefault true;
+ hardware.pulseaudio.enable = mkDefault true;
+ security.polkit.enable = true;
+ services.accounts-daemon.enable = true;
+ services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+ services.dbus.packages = with pkgs.cinnamon; [
+ cinnamon-common
+ cinnamon-screensaver
+ nemo
+ xapps
+ ];
+ services.cinnamon.apps.enable = mkDefault true;
+ services.gnome3.glib-networking.enable = true;
+ services.gnome3.gnome-keyring.enable = true;
+ services.gvfs.enable = true;
+ services.udisks2.enable = true;
+ services.upower.enable = mkDefault config.powerManagement.enable;
+ services.xserver.libinput.enable = mkDefault true;
+ services.xserver.updateDbusEnvironment = true;
+ networking.networkmanager.enable = mkDefault true;
+
+ # Enable colord server
+ services.colord.enable = true;
+
+ # Enable dconf
+ programs.dconf.enable = true;
+
+ # Enable org.a11y.Bus
+ services.gnome3.at-spi2-core.enable = true;
+
+ # Fix lockscreen
+ security.pam.services = {
+ cinnamon-screensaver = {};
+ };
+
+ environment.systemPackages = with pkgs.cinnamon // pkgs; [
+ desktop-file-utils
+ nixos-artwork.wallpapers.simple-dark-gray
+ onboard
+ sound-theme-freedesktop
+
+ # common-files
+ cinnamon-common
+ cinnamon-session
+ cinnamon-desktop
+ cinnamon-menus
+
+ # utils needed by some scripts
+ killall
+
+ # session requirements
+ cinnamon-screensaver
+ # cinnamon-killer-daemon: provided by cinnamon-common
+ gnome3.networkmanagerapplet # session requirement - also nm-applet not needed
+
+ # packages
+ nemo
+ cinnamon-control-center
+ cinnamon-settings-daemon
+ gnome3.libgnomekbd
+ orca
+
+ # theme
+ gnome3.adwaita-icon-theme
+ hicolor-icon-theme
+ gnome3.gnome-themes-extra
+ gtk3.out
+ mint-artwork
+ mint-themes
+ mint-x-icons
+ mint-y-icons
+ vanilla-dmz
+
+ # other
+ glib # for gsettings
+ shared-mime-info # for update-mime-database
+ xdg-user-dirs
+ ];
+
+ # Override GSettings schemas
+ environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
+
+ environment.pathsToLink = [
+ # FIXME: modules should link subdirs of `/share` rather than relying on this
+ "/share" # TODO: https://github.com/NixOS/nixpkgs/issues/47173
+ ];
+
+ # Shell integration for VTE terminals
+ programs.bash.vteIntegration = mkDefault true;
+ programs.zsh.vteIntegration = mkDefault true;
+
+ # Harmonize Qt5 applications under Pantheon
+ qt5.enable = true;
+ qt5.platformTheme = "gnome";
+ qt5.style = "adwaita";
+
+ # Default Fonts
+ fonts.fonts = with pkgs; [
+ source-code-pro # Default monospace font in 3.32
+ ubuntu_font_family # required for default theme
+ ];
+ })
+
+ (mkIf serviceCfg.apps.enable {
+ programs.geary.enable = mkDefault true;
+ programs.gnome-disks.enable = mkDefault true;
+ programs.gnome-terminal.enable = mkDefault true;
+ programs.evince.enable = mkDefault true;
+ programs.file-roller.enable = mkDefault true;
+
+ environment.systemPackages = (with pkgs // pkgs.gnome3 // pkgs.cinnamon; pkgs.gnome3.removePackagesByName [
+ # cinnamon team apps
+ blueberry
+ warpinator
+
+ # external apps shipped with linux-mint
+ hexchat
+ gnome-calculator
+ ] config.environment.cinnamon.excludePackages);
+ })
+ ];
+}
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/default.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/default.nix
index 5d3a84d7139..f5559eb5354 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/default.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/default.nix
@@ -21,6 +21,7 @@ in
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
./mate.nix ./pantheon.nix ./surf-display.nix ./cde.nix
+ ./cinnamon.nix
];
options = {
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix
index bbc7feb2d04..69cf9832172 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -37,10 +37,10 @@ let
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
[org.gnome.desktop.background]
- picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png'
+ picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}'
[org.gnome.desktop.screensaver]
- picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png'
+ picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath}'
[org.gnome.shell]
favorite-apps=[ 'org.gnome.Epiphany.desktop', 'org.gnome.Geary.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]
@@ -320,6 +320,8 @@ in
gnome-shell
gnome-shell-extensions
gnome-themes-extra
+ pkgs.nixos-artwork.wallpapers.simple-dark-gray
+ pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom
pkgs.gnome-user-docs
pkgs.orca
pkgs.glib # for gsettings
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
index 5fcc8590232..e67e216f90d 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
@@ -180,6 +180,7 @@ in
gtk3.out
hicolor-icon-theme
lightlocker
+ nixos-artwork.wallpapers.simple-dark-gray
onboard
qgnomeplatform
shared-mime-info
@@ -239,6 +240,8 @@ in
# Otherwise you can't store NetworkManager Secrets with
# "Store the password only for this user"
programs.nm-applet.enable = true;
+ # Pantheon has its own network indicator
+ programs.nm-applet.indicator = false;
# Shell integration for VTE terminals
programs.bash.vteIntegration = mkDefault true;
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 6d48b899d23..149f6cbb762 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -7,7 +7,9 @@ let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.plasma5;
- inherit (pkgs) kdeApplications plasma5 libsForQt5 qt5;
+ inherit (pkgs) kdeApplications kdeFrameworks plasma5;
+ libsForQt5 = pkgs.libsForQt514;
+ qt5 = pkgs.qt514;
inherit (pkgs) writeText;
pulseaudio = config.hardware.pulseaudio;
@@ -83,7 +85,7 @@ let
# recognize that software that has been removed.
rm -fv $HOME/.cache/ksycoca*
- ${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5
+ ${libsForQt5.kservice}/bin/kbuildsycoca5
'';
set_XDG_CONFIG_HOME = ''
@@ -203,7 +205,9 @@ in
KERNEL=="i2c-[0-9]*", TAG+="uaccess"
'';
- environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications;
+ environment.systemPackages =
+ with qt5; with libsForQt5;
+ with plasma5; with kdeApplications; with kdeFrameworks;
[
frameworkintegration
kactivities
@@ -293,7 +297,7 @@ in
qtvirtualkeyboard
- xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
+ pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
]
# Phonon audio backend
@@ -301,13 +305,13 @@ in
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
# Optional hardware support features
- ++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt openobex obexftp ]
+ ++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt pkgs.openobex pkgs.obexftp ]
++ lib.optional config.networking.networkmanager.enable plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
++ lib.optional config.powerManagement.enable powerdevil
- ++ lib.optional config.services.colord.enable colord-kde
+ ++ lib.optional config.services.colord.enable pkgs.colord-kde
++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ]
- ++ lib.optional config.services.xserver.wacom.enable wacomtablet;
+ ++ lib.optional config.services.xserver.wacom.enable pkgs.wacomtablet;
environment.pathsToLink = [
# FIXME: modules should link subdirs of `/share` rather than relying on this
@@ -321,7 +325,7 @@ in
fonts.fonts = with pkgs; [ noto-fonts hack-font ];
fonts.fontconfig.defaultFonts = {
- monospace = [ "Hack" "Noto Mono" ];
+ monospace = [ "Hack" "Noto Sans Mono" ];
sansSerif = [ "Noto Sans" ];
serif = [ "Noto Serif" ];
};
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
index aa6a5ec42be..08ce8edd661 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
@@ -55,13 +55,6 @@ let
exec &> >(tee ~/.xsession-errors)
''}
- # Tell systemd about our $DISPLAY and $XAUTHORITY.
- # This is needed by the ssh-agent unit.
- #
- # Also tell systemd about the dbus session bus address.
- # This is required by user units using the session bus.
- /run/current-system/systemd/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
-
# Load X defaults. This should probably be safe on wayland too.
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
if test -e ~/.Xresources; then
@@ -70,6 +63,12 @@ let
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
fi
+ # Import environment variables into the systemd user environment.
+ ${optionalString (cfg.displayManager.importedVariables != []) (
+ "/run/current-system/systemd/bin/systemctl --user import-environment "
+ + toString (unique cfg.displayManager.importedVariables)
+ )}
+
# Speed up application start by 50-150ms according to
# http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
rm -rf "$HOME/.compose-cache"
@@ -289,6 +288,14 @@ in
'';
};
+ importedVariables = mkOption {
+ type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*");
+ visible = false;
+ description = ''
+ Environment variables to import into the systemd user environment.
+ '';
+ };
+
job = {
preStart = mkOption {
@@ -332,12 +339,45 @@ in
};
+ # Configuration for automatic login. Common for all DM.
+ autoLogin = mkOption {
+ type = types.submodule {
+ options = {
+ enable = mkOption {
+ type = types.bool;
+ default = cfg.displayManager.autoLogin.user != null;
+ description = ''
+ Automatically log in as <option>autoLogin.user</option>.
+ '';
+ };
+
+ user = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ User to be used for the automatic login.
+ '';
+ };
+ };
+ };
+
+ default = {};
+ description = ''
+ Auto login configuration attrset.
+ '';
+ };
+
};
};
config = {
assertions = [
+ { assertion = cfg.displayManager.autoLogin.enable -> cfg.displayManager.autoLogin.user != null;
+ message = ''
+ services.xserver.displayManager.autoLogin.enable requires services.xserver.displayManager.autoLogin.user to be set
+ '';
+ }
{
assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions;
message = "You cannot use both services.xserver.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default).";
@@ -360,6 +400,16 @@ in
services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X";
+ services.xserver.displayManager.importedVariables = [
+ # This is required by user units using the session bus.
+ "DBUS_SESSION_BUS_ADDRESS"
+ # These are needed by the ssh-agent unit.
+ "DISPLAY"
+ "XAUTHORITY"
+ # This is required to specify session within user units (e.g. loginctl lock-session).
+ "XDG_SESSION_ID"
+ ];
+
systemd.user.targets.graphical-session = {
unitConfig = {
RefuseManualStart = false;
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
index 622ea62f3a9..eae70a57c78 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
@@ -37,6 +37,22 @@ let
in
{
+ imports = [
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "enable" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "enable"
+ ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "user" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "user"
+ ])
+ ];
meta = {
maintainers = teams.gnome.members;
@@ -48,48 +64,17 @@ in
services.xserver.displayManager.gdm = {
- enable = mkEnableOption ''
- GDM, the GNOME Display Manager
- '';
+ enable = mkEnableOption "GDM, the GNOME Display Manager";
- debug = mkEnableOption ''
- debugging messages in GDM
- '';
+ debug = mkEnableOption "debugging messages in GDM";
- autoLogin = mkOption {
- default = {};
+ # Auto login options specific to GDM
+ autoLogin.delay = mkOption {
+ type = types.int;
+ default = 0;
description = ''
- Auto login configuration attrset.
+ Seconds of inactivity after which the autologin will be performed.
'';
-
- type = types.submodule {
- options = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Automatically log in as the sepecified <option>autoLogin.user</option>.
- '';
- };
-
- user = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- User to be used for the autologin.
- '';
- };
-
- delay = mkOption {
- type = types.int;
- default = 0;
- description = ''
- Seconds of inactivity after which the autologin will be performed.
- '';
- };
-
- };
- };
};
wayland = mkOption {
@@ -128,12 +113,6 @@ in
config = mkIf cfg.gdm.enable {
- assertions = [
- { assertion = cfg.gdm.autoLogin.enable -> cfg.gdm.autoLogin.user != null;
- message = "GDM auto-login requires services.xserver.displayManager.gdm.autoLogin.user to be set";
- }
- ];
-
services.xserver.displayManager.lightdm.enable = false;
users.users.gdm =
@@ -217,7 +196,6 @@ in
KillMode = "mixed";
IgnoreSIGPIPE = "no";
BusName = "org.gnome.DisplayManager";
- StandardOutput = "syslog";
StandardError = "inherit";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
KeyringMode = "shared";
@@ -287,14 +265,14 @@ in
environment.etc."gdm/custom.conf".text = ''
[daemon]
WaylandEnable=${if cfg.gdm.wayland then "true" else "false"}
- ${optionalString cfg.gdm.autoLogin.enable (
+ ${optionalString cfg.autoLogin.enable (
if cfg.gdm.autoLogin.delay > 0 then ''
TimedLoginEnable=true
- TimedLogin=${cfg.gdm.autoLogin.user}
+ TimedLogin=${cfg.autoLogin.user}
TimedLoginDelay=${toString cfg.gdm.autoLogin.delay}
'' else ''
AutomaticLoginEnable=true
- AutomaticLogin=${cfg.gdm.autoLogin.user}
+ AutomaticLogin=${cfg.autoLogin.user}
'')
}
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
index 087c6b9c38a..9bc9e2bf616 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
@@ -43,7 +43,7 @@ in
services.xserver.displayManager.lightdm.extraSeatDefaults = "greeter-show-manual-login=true";
environment.etc."lightdm/io.elementary.greeter.conf".source = "${pkgs.pantheon.elementary-greeter}/etc/lightdm/io.elementary.greeter.conf";
- environment.etc."wingpanel.d/io.elementary.greeter.whitelist".source = "${pkgs.pantheon.elementary-default-settings}/etc/wingpanel.d/io.elementary.greeter.whitelist";
+ environment.etc."wingpanel.d/io.elementary.greeter.allowed".source = "${pkgs.pantheon.elementary-default-settings}/etc/wingpanel.d/io.elementary.greeter.allowed";
};
}
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
index 479548863b4..143785db0b4 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -53,8 +53,8 @@ let
${optionalString cfg.greeter.enable ''
greeter-session = ${cfg.greeter.name}
''}
- ${optionalString cfg.autoLogin.enable ''
- autologin-user = ${cfg.autoLogin.user}
+ ${optionalString dmcfg.autoLogin.enable ''
+ autologin-user = ${dmcfg.autoLogin.user}
autologin-user-timeout = ${toString cfg.autoLogin.timeout}
autologin-session = ${sessionData.autologinSession}
''}
@@ -82,6 +82,20 @@ in
./lightdm-greeters/enso-os.nix
./lightdm-greeters/pantheon.nix
./lightdm-greeters/tiny.nix
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "enable"
+ ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "user"
+ ])
];
options = {
@@ -132,8 +146,9 @@ in
};
background = mkOption {
- type = types.str;
- default = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png";
+ 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";
description = ''
The background image or color to use.
'';
@@ -148,39 +163,13 @@ in
description = "Extra lines to append to SeatDefaults section.";
};
- autoLogin = mkOption {
- default = {};
+ # Configuration for automatic login specific to LightDM
+ autoLogin.timeout = mkOption {
+ type = types.int;
+ default = 0;
description = ''
- Configuration for automatic login.
+ Show the greeter for this many seconds before automatic login occurs.
'';
-
- type = types.submodule {
- options = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Automatically log in as the specified <option>autoLogin.user</option>.
- '';
- };
-
- user = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- User to be used for the automatic login.
- '';
- };
-
- timeout = mkOption {
- type = types.int;
- default = 0;
- description = ''
- Show the greeter for this many seconds before automatic login occurs.
- '';
- };
- };
- };
};
};
@@ -194,17 +183,12 @@ in
LightDM requires services.xserver.enable to be true
'';
}
- { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
- message = ''
- LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set
- '';
- }
- { assertion = cfg.autoLogin.enable -> sessionData.autologinSession != null;
+ { assertion = dmcfg.autoLogin.enable -> sessionData.autologinSession != null;
message = ''
LightDM auto-login requires that services.xserver.displayManager.defaultSession is set.
'';
}
- { assertion = !cfg.greeter.enable -> (cfg.autoLogin.enable && cfg.autoLogin.timeout == 0);
+ { assertion = !cfg.greeter.enable -> (dmcfg.autoLogin.enable && cfg.autoLogin.timeout == 0);
message = ''
LightDM can only run without greeter if automatic login is enabled and the timeout for it
is set to zero.
@@ -212,9 +196,12 @@ in
}
];
+ # Keep in sync with the defaultText value from the option definition.
+ services.xserver.displayManager.lightdm.background = mkDefault pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
+
# Set default session in session chooser to a specified values – basically ignore session history.
# Auto-login is already covered by a config value.
- services.xserver.displayManager.job.preStart = optionalString (!cfg.autoLogin.enable && dmcfg.defaultSession != null) ''
+ services.xserver.displayManager.job.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) ''
${setSessionScript}/bin/set-session ${dmcfg.defaultSession}
'';
@@ -266,7 +253,6 @@ in
KeyringMode = "shared";
KillMode = "mixed";
StandardError = "inherit";
- StandardOutput = "syslog";
};
environment.etc."lightdm/lightdm.conf".source = lightdmConf;
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix
index 2f42271da87..e63bb2e4453 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix
@@ -61,9 +61,9 @@ let
EnableHidpi=${if cfg.enableHidpi then "true" else "false"}
SessionDir=${dmcfg.sessionData.desktops}/share/wayland-sessions
- ${optionalString cfg.autoLogin.enable ''
+ ${optionalString dmcfg.autoLogin.enable ''
[Autologin]
- User=${cfg.autoLogin.user}
+ User=${dmcfg.autoLogin.user}
Session=${autoLoginSessionName}.desktop
Relogin=${boolToString cfg.autoLogin.relogin}
''}
@@ -78,6 +78,20 @@ in
imports = [
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "sddm" "themes" ]
"Set the option `services.xserver.displayManager.sddm.package' instead.")
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "enable" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "enable"
+ ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "user" ] [
+ "services"
+ "xserver"
+ "displayManager"
+ "autoLogin"
+ "user"
+ ])
];
options = {
@@ -153,40 +167,14 @@ in
'';
};
- autoLogin = mkOption {
- default = {};
+ # Configuration for automatic login specific to SDDM
+ autoLogin.relogin = mkOption {
+ type = types.bool;
+ default = false;
description = ''
- Configuration for automatic login.
+ If true automatic login will kick in again on session exit (logout), otherwise it
+ will only log in automatically when the display-manager is started.
'';
-
- type = types.submodule {
- options = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Automatically log in as <option>autoLogin.user</option>.
- '';
- };
-
- user = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- User to be used for the automatic login.
- '';
- };
-
- relogin = mkOption {
- type = types.bool;
- default = false;
- description = ''
- If true automatic login will kick in again on session exit (logout), otherwise it
- will only log in automatically when the display-manager is started.
- '';
- };
- };
- };
};
};
@@ -201,12 +189,7 @@ in
SDDM requires services.xserver.enable to be true
'';
}
- { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
- message = ''
- SDDM auto-login requires services.xserver.displayManager.sddm.autoLogin.user to be set
- '';
- }
- { assertion = cfg.autoLogin.enable -> autoLoginSessionName != null;
+ { assertion = dmcfg.autoLogin.enable -> autoLoginSessionName != null;
message = ''
SDDM auto-login requires that services.xserver.displayManager.defaultSession is set.
'';
diff --git a/nixpkgs/nixos/modules/services/x11/imwheel.nix b/nixpkgs/nixos/modules/services/x11/imwheel.nix
index 3923df498e7..51f72dadbd4 100644
--- a/nixpkgs/nixos/modules/services/x11/imwheel.nix
+++ b/nixpkgs/nixos/modules/services/x11/imwheel.nix
@@ -61,7 +61,8 @@ in
"--kill"
] ++ cfg.extraOptions);
ExecStop = "${pkgs.procps}/bin/pkill imwheel";
- Restart = "on-failure";
+ RestartSec = 3;
+ Restart = "always";
};
};
};
diff --git a/nixpkgs/nixos/modules/services/x11/urserver.nix b/nixpkgs/nixos/modules/services/x11/urserver.nix
new file mode 100644
index 00000000000..0beb62eb766
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/x11/urserver.nix
@@ -0,0 +1,38 @@
+# urserver service
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.urserver;
+in {
+
+ options.services.urserver.enable = lib.mkEnableOption "urserver";
+
+ config = lib.mkIf cfg.enable {
+
+ networking.firewall = {
+ allowedTCPPorts = [ 9510 9512 ];
+ allowedUDPPorts = [ 9511 9512 ];
+ };
+
+ systemd.user.services.urserver = {
+ description = ''
+ Server for Unified Remote: The one-and-only remote for your computer.
+ '';
+ wantedBy = [ "graphical-session.target" ];
+ partOf = [ "graphical-session.target" ];
+ after = [ "network.target" ];
+ serviceConfig = {
+ Type = "forking";
+ ExecStart = ''
+ ${pkgs.urserver}/bin/urserver --daemon
+ '';
+ ExecStop = ''
+ ${pkgs.procps}/bin/pkill urserver
+ '';
+ RestartSec = 3;
+ Restart = "on-failure";
+ };
+ };
+ };
+
+}
diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix b/nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix
index ad3b65150b0..cadc316bbc4 100644
--- a/nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix
+++ b/nixpkgs/nixos/modules/services/x11/window-managers/qtile.nix
@@ -19,7 +19,7 @@ in
waitPID=$!
'';
}];
-
+
environment.systemPackages = [ pkgs.qtile ];
};
}
diff --git a/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix b/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix
index 30c59b88f82..dba25da8260 100644
--- a/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix
+++ b/nixpkgs/nixos/modules/services/x11/window-managers/xmonad.nix
@@ -16,6 +16,7 @@ let
cfg.extraPackages cfg.haskellPackages ++
optionals cfg.enableContribAndExtras
(with cfg.haskellPackages; [ xmonad-contrib xmonad-extras ]);
+ inherit (cfg) ghcArgs;
} cfg.config;
in
@@ -76,18 +77,35 @@ in
}
'';
};
+
+ xmonadCliArgs = mkOption {
+ default = [];
+ type = with lib.types; listOf str;
+ description = ''
+ Command line arguments passed to the xmonad binary.
+ '';
+ };
+
+ ghcArgs = mkOption {
+ default = [];
+ type = with lib.types; listOf str;
+ description = ''
+ Command line arguments passed to the compiler (ghc)
+ invocation when xmonad.config is set.
+ '';
+ };
+
};
};
config = mkIf cfg.enable {
services.xserver.windowManager = {
session = [{
name = "xmonad";
- start = if (cfg.config != null) then ''
- ${xmonadBin}
- waitPID=$!
- '' else ''
- systemd-cat -t xmonad ${xmonad}/bin/xmonad &
- waitPID=$!
+ start = let
+ xmonadCommand = if (cfg.config != null) then xmonadBin else "${xmonad}/bin/xmonad";
+ in ''
+ systemd-cat -t xmonad -- ${xmonadCommand} ${lib.escapeShellArgs cfg.xmonadCliArgs} &
+ waitPID=$!
'';
}];
};
diff --git a/nixpkgs/nixos/modules/services/x11/xserver.nix b/nixpkgs/nixos/modules/services/x11/xserver.nix
index 6aec1c0753a..400173745d3 100644
--- a/nixpkgs/nixos/modules/services/x11/xserver.nix
+++ b/nixpkgs/nixos/modules/services/x11/xserver.nix
@@ -246,7 +246,7 @@ in
videoDrivers = mkOption {
type = types.listOf types.str;
# !!! We'd like "nv" here, but it segfaults the X server.
- default = [ "radeon" "cirrus" "vesa" "vmware" "modesetting" ];
+ default = [ "radeon" "cirrus" "vesa" "modesetting" ];
example = [
"ati_unfree" "amdgpu" "amdgpu-pro"
"nv" "nvidia" "nvidiaLegacy390" "nvidiaLegacy340" "nvidiaLegacy304"