From 6490c6ba21f5f16987a10d8460376d18a07c7685 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 17 Jul 2011 10:52:40 +0000 Subject: [PATCH] * Don't use /tmp/kdm as the home directory for the kdm user - sounds insecure. * Create /var/lib/kdm. * In kdmrc, set BootManager to "Grub2" if we're using GRUB 2. svn path=/nixos/trunk/; revision=27805 --- modules/services/x11/display-managers/kdm.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/services/x11/display-managers/kdm.nix b/modules/services/x11/display-managers/kdm.nix index 2c5a720f815e..613e15b0147e 100644 --- a/modules/services/x11/display-managers/kdm.nix +++ b/modules/services/x11/display-managers/kdm.nix @@ -1,4 +1,4 @@ -{pkgs, config, ...}: +{ config, pkgs, ... }: with pkgs.lib; @@ -15,7 +15,7 @@ let HaltCmd=${config.system.build.upstart}/sbin/halt RebootCmd=${config.system.build.upstart}/sbin/reboot ${optionalString (config.system.boot.loader.id == "grub") '' - BootManager=Grub + BootManager=${if config.boot.loader.grub.version == 2 then "Grub2" else "Grub"} ''} [X-*-Core] @@ -99,8 +99,11 @@ in services.xserver.displayManager.job = { execCmd = - (optionalString (config.system.boot.loader.id == "grub") "PATH=${config.system.build.grub}/sbin:$PATH ") + - "KDEDIRS=${kdebase_workspace} exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon"; + '' + mkdir -p /var/lib/kdm + ${(optionalString (config.system.boot.loader.id == "grub") "PATH=${config.system.build.grub}/sbin:$PATH ") + + "KDEDIRS=${kdebase_workspace} exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon"} + ''; logsXsession = true; }; @@ -109,8 +112,7 @@ in users.extraUsers = singleton { name = "kdm"; uid = config.ids.uids.kdm; - description = "kdm user"; - home = "/tmp/kdm"; + description = "KDM user"; }; };