Skip to content

Commit e97f73d

Browse files
worldofpeacedtzWill
authored andcommitted
Merge pull request NixOS#73251 from worldofpeace/remove-slim
nixos/slim: remove (cherry picked from commit 4583e29)
1 parent 02b3e27 commit e97f73d

File tree

21 files changed

+31
-682
lines changed

21 files changed

+31
-682
lines changed

nixos/doc/manual/configuration/x-windows.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
can select an alternative one by picking one of the following lines:
4040
<programlisting>
4141
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/> = true;
42-
<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true;
42+
<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true;
4343
</programlisting>
4444
</para>
4545
<para>

nixos/doc/manual/development/option-declarations.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming">
9999
<para>
100100
As an example, we will take the case of display managers. There is a central
101101
display manager module for generic display manager options and a module file
102-
per display manager backend (slim, sddm, gdm ...).
102+
per display manager backend (sddm, gdm ...).
103103
</para>
104104

105105
<para>
@@ -146,7 +146,7 @@ xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming">
146146
/>), and to extend
147147
it in each backend module
148148
(<xref
149-
linkend='ex-option-declaration-eot-backend-slim' />,
149+
linkend='ex-option-declaration-eot-backend-gdm' />,
150150
<xref
151151
linkend='ex-option-declaration-eot-backend-sddm' />).
152152
</para>
@@ -167,11 +167,11 @@ services.xserver.displayManager.enable = mkOption {
167167
};</screen>
168168
</example>
169169

170-
<example xml:id='ex-option-declaration-eot-backend-slim'>
171-
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>slim</literal> module</title>
170+
<example xml:id='ex-option-declaration-eot-backend-gdm'>
171+
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title>
172172
<screen>
173173
services.xserver.displayManager.enable = mkOption {
174-
type = with types; nullOr (enum [ "slim" ]);
174+
type = with types; nullOr (enum [ "gdm" ]);
175175
};</screen>
176176
</example>
177177

nixos/doc/manual/release-notes/rl-2003.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@
9292
GnuPG anyway.
9393
</para>
9494
</listitem>
95+
<listitem>
96+
<para>
97+
The SLIM Display Manager has been removed, as it has been unmaintained since 2013.
98+
Consider migrating to a different display manager such as LightDM (current default in NixOS),
99+
SDDM, GDM, or using the startx module which uses Xinitrc.
100+
</para>
101+
</listitem>
95102
</itemizedlist>
96103
</section>
97104

nixos/lib/testing-python.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ in rec {
258258
inherit require;
259259
virtualisation.memorySize = 1024;
260260
services.xserver.enable = true;
261-
services.xserver.displayManager.slim.enable = false;
262261
services.xserver.displayManager.auto.enable = true;
263262
services.xserver.windowManager.default = "icewm";
264263
services.xserver.windowManager.icewm.enable = true;

nixos/lib/testing.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ in rec {
248248
inherit require;
249249
virtualisation.memorySize = 1024;
250250
services.xserver.enable = true;
251-
services.xserver.displayManager.slim.enable = false;
252251
services.xserver.displayManager.auto.enable = true;
253252
services.xserver.windowManager.default = "icewm";
254253
services.xserver.windowManager.icewm.enable = true;

nixos/modules/hardware/video/nvidia.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ in
7575
7676
Note that this configuration will only be successful when a display manager
7777
for which the <option>services.xserver.displayManager.setupCommands</option>
78-
option is supported is used; notably, SLiM is not supported.
78+
option is supported is used.
7979
'';
8080
};
8181

nixos/modules/services/x11/desktop-managers/plasma5.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ in
231231
security.pam.services.kdm.enableKwallet = true;
232232
security.pam.services.lightdm.enableKwallet = true;
233233
security.pam.services.sddm.enableKwallet = true;
234-
security.pam.services.slim.enableKwallet = true;
235234

236235
xdg.portal.enable = true;
237236
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];

nixos/modules/services/x11/display-managers/default.nix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This module declares the options to define a *display manager*, the
2-
# program responsible for handling X logins (such as xdm, gdb, or
3-
# SLiM). The display manager allows the user to select a *session
4-
# type*. When the user logs in, the display manager starts the
2+
# program responsible for handling X logins (such as LightDM, GDM, or SDDM).
3+
# The display manager allows the user to select a *session
4+
# type*. When the user logs in, the display manager starts the
55
# *session script* ("xsession" below) to launch the selected session
6-
# type. The session type defines two things: the *desktop manager*
6+
# type. The session type defines two things: the *desktop manager*
77
# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
88
# manager* (e.g. kwin or twm).
99

@@ -196,7 +196,6 @@ let
196196
fi
197197
'') cfg.displayManager.extraSessionFilePackages}
198198
199-
200199
${concatMapStrings (pkg: ''
201200
if test -d ${pkg}/share/wayland-sessions; then
202201
mkdir -p "$out/share/wayland-sessions"
@@ -322,15 +321,14 @@ in
322321
execCmd = mkOption {
323322
type = types.str;
324323
example = literalExample ''
325-
"''${pkgs.slim}/bin/slim"
324+
"''${pkgs.lightdm}/bin/lightdm"
326325
'';
327326
description = "Command to start the display manager.";
328327
};
329328

330329
environment = mkOption {
331330
type = types.attrsOf types.unspecified;
332331
default = {};
333-
example = { SLIM_CFGFILE = "/etc/slim.conf"; };
334332
description = "Additional environment variables needed by the display manager.";
335333
};
336334

nixos/modules/services/x11/display-managers/slim.nix

Lines changed: 10 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -2,155 +2,15 @@
22

33
with lib;
44

5-
let
6-
7-
dmcfg = config.services.xserver.displayManager;
8-
9-
cfg = dmcfg.slim;
10-
11-
slimConfig = pkgs.writeText "slim.cfg"
12-
''
13-
xauth_path ${dmcfg.xauthBin}
14-
default_xserver ${dmcfg.xserverBin}
15-
xserver_arguments ${toString dmcfg.xserverArgs}
16-
sessiondir ${dmcfg.session.desktops}/share/xsessions
17-
login_cmd exec ${pkgs.runtimeShell} ${dmcfg.session.wrapper} "%session"
18-
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
19-
reboot_cmd ${config.systemd.package}/sbin/shutdown -r now
20-
logfile /dev/stderr
21-
${optionalString (cfg.defaultUser != null) ("default_user " + cfg.defaultUser)}
22-
${optionalString (cfg.defaultUser != null) ("focus_password yes")}
23-
${optionalString cfg.autoLogin "auto_login yes"}
24-
${optionalString (cfg.consoleCmd != null) "console_cmd ${cfg.consoleCmd}"}
25-
${cfg.extraConfig}
26-
'';
27-
28-
# Unpack the SLiM theme, or use the default.
29-
slimThemesDir =
30-
let
31-
unpackedTheme = pkgs.runCommand "slim-theme" { preferLocalBuild = true; }
32-
''
33-
mkdir -p $out
34-
cd $out
35-
unpackFile ${cfg.theme}
36-
ln -s * default
37-
'';
38-
in if cfg.theme == null then "${pkgs.slim}/share/slim/themes" else unpackedTheme;
39-
40-
in
41-
425
{
43-
44-
###### interface
45-
46-
options = {
47-
48-
services.xserver.displayManager.slim = {
49-
50-
enable = mkOption {
51-
type = types.bool;
52-
default = false;
53-
description = ''
54-
Whether to enable SLiM as the display manager.
55-
'';
56-
};
57-
58-
theme = mkOption {
59-
type = types.nullOr types.path;
60-
default = pkgs.fetchurl {
61-
url = "https://github.com/jagajaga/nixos-slim-theme/archive/2.0.tar.gz";
62-
sha256 = "0lldizhigx7bjhxkipii87y432hlf5wdvamnfxrryf9z7zkfypc8";
63-
};
64-
defaultText = ''pkgs.fetchurl {
65-
url = "https://github.com/jagajaga/nixos-slim-theme/archive/2.0.tar.gz";
66-
sha256 = "0lldizhigx7bjhxkipii87y432hlf5wdvamnfxrryf9z7zkfypc8";
67-
}'';
68-
example = literalExample ''
69-
pkgs.fetchurl {
70-
url = "mirror://sourceforge/slim.berlios/slim-wave.tar.gz";
71-
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
72-
}
73-
'';
74-
description = ''
75-
The theme for the SLiM login manager. If not specified, SLiM's
76-
default theme is used. See <link
77-
xlink:href='http://slim.berlios.de/themes01.php'/> for a
78-
collection of themes. TODO: berlios shut down.
79-
'';
80-
};
81-
82-
defaultUser = mkOption {
83-
type = types.nullOr types.str;
84-
default = null;
85-
example = "login";
86-
description = ''
87-
The default user to load. If you put a username here you
88-
get it automatically loaded into the username field, and
89-
the focus is placed on the password.
90-
'';
91-
};
92-
93-
autoLogin = mkOption {
94-
type = types.bool;
95-
default = false;
96-
description = ''
97-
Automatically log in as the default user.
98-
'';
99-
};
100-
101-
extraConfig = mkOption {
102-
type = types.lines;
103-
default = "";
104-
description = ''
105-
Extra configuration options for SLiM login manager. Do not
106-
add options that can be configured directly.
107-
'';
108-
};
109-
110-
consoleCmd = mkOption {
111-
type = types.nullOr types.str;
112-
default = ''
113-
${pkgs.xterm}/bin/xterm -C -fg white -bg black +sb -T "Console login" -e ${pkgs.shadow}/bin/login
114-
'';
115-
defaultText = ''
116-
''${pkgs.xterm}/bin/xterm -C -fg white -bg black +sb -T "Console login" -e ''${pkgs.shadow}/bin/login
117-
'';
118-
description = ''
119-
The command to run when "console" is given as the username.
120-
'';
121-
};
122-
};
123-
124-
};
125-
126-
127-
###### implementation
128-
129-
config = mkIf cfg.enable {
130-
131-
services.xserver.displayManager.job =
132-
{ environment =
133-
{ SLIM_CFGFILE = slimConfig;
134-
SLIM_THEMESDIR = slimThemesDir;
135-
};
136-
execCmd = "exec ${pkgs.slim}/bin/slim";
137-
};
138-
139-
services.xserver.displayManager.sessionCommands =
140-
''
141-
# Export the config/themes for slimlock.
142-
export SLIM_THEMESDIR=${slimThemesDir}
143-
'';
144-
145-
# Allow null passwords so that the user can login as root on the
146-
# installation CD.
147-
security.pam.services.slim = { allowNullPassword = true; startSession = true; };
148-
149-
# Allow slimlock to work.
150-
security.pam.services.slimlock = {};
151-
152-
environment.systemPackages = [ pkgs.slim ];
153-
154-
};
155-
6+
# added 2019-11-11
7+
imports = [
8+
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "slim" ] ''
9+
The SLIM project is abandoned and their last release was in 2013.
10+
Because of this it poses a security risk to your system.
11+
Other issues include it not fully supporting systemd and logind sessions.
12+
Please use a different display manager such as LightDM, SDDM, or GDM.
13+
You can also use the startx module which uses Xinitrc.
14+
'')
15+
];
15616
}

nixos/modules/services/x11/xserver.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ in
557557
default = !( dmconf.auto.enable
558558
|| dmconf.gdm.enable
559559
|| dmconf.sddm.enable
560-
|| dmconf.slim.enable
561560
|| dmconf.xpra.enable );
562561
in mkIf (default) true;
563562

nixos/release-combined.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ in rec {
133133
(all nixos.tests.proxy)
134134
(all nixos.tests.sddm.default)
135135
(all nixos.tests.simple)
136-
(all nixos.tests.slim)
137136
(all nixos.tests.switchTest)
138137
(all nixos.tests.udisks2)
139138
(all nixos.tests.xfce)

nixos/tests/all-tests.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ in
247247
sddm = handleTest ./sddm.nix {};
248248
signal-desktop = handleTest ./signal-desktop.nix {};
249249
simple = handleTest ./simple.nix {};
250-
slim = handleTest ./slim.nix {};
251250
slurm = handleTest ./slurm.nix {};
252251
smokeping = handleTest ./smokeping.nix {};
253252
snapper = handleTest ./snapper.nix {};

nixos/tests/slim.nix

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)