Ensure that slim's theme applies to slimlock
This commit is contained in:
parent
d084be9965
commit
0fdd641b21
@ -7,8 +7,6 @@ let
|
|||||||
dmcfg = config.services.xserver.displayManager;
|
dmcfg = config.services.xserver.displayManager;
|
||||||
|
|
||||||
cfg = dmcfg.slim;
|
cfg = dmcfg.slim;
|
||||||
|
|
||||||
slimPackage = cfg.package;
|
|
||||||
|
|
||||||
slimConfig = pkgs.writeText "slim.cfg"
|
slimConfig = pkgs.writeText "slim.cfg"
|
||||||
''
|
''
|
||||||
@ -35,7 +33,7 @@ let
|
|||||||
ln -s * default
|
ln -s * default
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in if cfg.theme == null then "${slimPackage}/share/slim/themes" else unpackedTheme;
|
in if cfg.theme == null then "${pkgs.slim}/share/slim/themes" else unpackedTheme;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -82,22 +80,6 @@ in
|
|||||||
the focus is placed on the password.
|
the focus is placed on the password.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = pkgs.slim;
|
|
||||||
description = ''
|
|
||||||
Configure slim package.
|
|
||||||
'';
|
|
||||||
example = ''
|
|
||||||
pkgs.slim.override {
|
|
||||||
theme = pkgs.fetchurl {
|
|
||||||
url = http://download.berlios.de/slim/slim-wave.tar.gz;
|
|
||||||
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
autoLogin = mkOption {
|
autoLogin = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@ -125,9 +107,15 @@ in
|
|||||||
{ SLIM_CFGFILE = slimConfig;
|
{ SLIM_CFGFILE = slimConfig;
|
||||||
SLIM_THEMESDIR = slimThemesDir;
|
SLIM_THEMESDIR = slimThemesDir;
|
||||||
};
|
};
|
||||||
execCmd = "exec ${slimPackage}/bin/slim";
|
execCmd = "exec ${pkgs.slim}/bin/slim";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.sessionCommands =
|
||||||
|
''
|
||||||
|
# Export the config/themes for slimlock.
|
||||||
|
export SLIM_THEMESDIR=${slimThemesDir}
|
||||||
|
'';
|
||||||
|
|
||||||
# Allow null passwords so that the user can login as root on the
|
# Allow null passwords so that the user can login as root on the
|
||||||
# installation CD.
|
# installation CD.
|
||||||
security.pam.services.slim = { allowNullPassword = true; startSession = true; };
|
security.pam.services.slim = { allowNullPassword = true; startSession = true; };
|
||||||
@ -135,7 +123,7 @@ in
|
|||||||
# Allow slimlock to work.
|
# Allow slimlock to work.
|
||||||
security.pam.services.slimlock = {};
|
security.pam.services.slimlock = {};
|
||||||
|
|
||||||
environment.systemPackages = [ slimPackage ];
|
environment.systemPackages = [ pkgs.slim ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
{ stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng
|
{ stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng
|
||||||
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }:
|
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs }:
|
||||||
|
|
||||||
let
|
|
||||||
slimThemesDir =
|
|
||||||
let
|
|
||||||
unpackedTheme = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "slim-theme";
|
|
||||||
buildCommand = ''
|
|
||||||
ensureDir $out
|
|
||||||
cd $out
|
|
||||||
unpackFile ${theme}
|
|
||||||
ln -s * default
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in if theme == null then "$out/share/slim/themes" else unpackedTheme;
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "slim-1.3.6";
|
name = "slim-1.3.6";
|
||||||
@ -35,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||||||
./run-once.patch
|
./run-once.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc --replace /lib $out/lib";
|
preConfigure = "substituteInPlace CMakeLists.txt --replace /lib $out/lib";
|
||||||
|
|
||||||
cmakeFlags = [ "-DUSE_PAM=1" ];
|
cmakeFlags = [ "-DUSE_PAM=1" ];
|
||||||
|
|
||||||
@ -47,10 +32,6 @@ stdenv.mkDerivation rec {
|
|||||||
xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper
|
xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
wrapProgram $out/bin/slimlock --set SLIM_THEMESDIR "${slimThemesDir}" --set SLIM_CFGFILE "$out/etc/slim.cfg"
|
|
||||||
'';
|
|
||||||
|
|
||||||
NIX_CFLAGS_LINK = "-lXmu";
|
NIX_CFLAGS_LINK = "-lXmu";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
|
diff -ru slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
|
||||||
--- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200
|
--- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200
|
||||||
+++ slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200
|
+++ slim-1.3.6/app.cpp 2014-03-30 19:01:04.115414201 +0200
|
||||||
@@ -200,7 +200,9 @@
|
@@ -200,7 +200,9 @@
|
||||||
|
|
||||||
/* Read configuration and theme */
|
/* Read configuration and theme */
|
||||||
@ -23,8 +23,31 @@ diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
|
|||||||
themeName = cfg->getOption("current_theme");
|
themeName = cfg->getOption("current_theme");
|
||||||
string::size_type pos;
|
string::size_type pos;
|
||||||
if ((pos = themeName.find(",")) != string::npos) {
|
if ((pos = themeName.find(",")) != string::npos) {
|
||||||
--- slim-1.3.6-orig/slimlock.cpp 2014-02-05 01:58:01.576560731 +0400
|
diff -ru slim-1.3.6-orig/CMakeLists.txt slim-1.3.6/CMakeLists.txt
|
||||||
+++ slim-1.3.6/slimlock.cpp 2014-02-05 02:11:16.587634246 +0400
|
--- slim-1.3.6-orig/CMakeLists.txt 2013-10-02 00:38:05.000000000 +0200
|
||||||
|
+++ slim-1.3.6/CMakeLists.txt 2014-03-30 19:16:48.445069729 +0200
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory")
|
||||||
|
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim")
|
||||||
|
-set(SYSCONFDIR "/etc")
|
||||||
|
+set(SYSCONFDIR "$ENV{out}/etc")
|
||||||
|
set(LIBDIR "/lib")
|
||||||
|
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@
|
||||||
|
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPACKAGE=\"slim\"")
|
||||||
|
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DVERSION=\"${SLIM_VERSION}\"")
|
||||||
|
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"")
|
||||||
|
-set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"")
|
||||||
|
+set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"/etc\"")
|
||||||
|
|
||||||
|
# Flags
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2")
|
||||||
|
Only in slim-1.3.6: CMakeLists.txt~
|
||||||
|
diff -ru slim-1.3.6-orig/slimlock.cpp slim-1.3.6/slimlock.cpp
|
||||||
|
--- slim-1.3.6-orig/slimlock.cpp 2013-10-02 00:38:05.000000000 +0200
|
||||||
|
+++ slim-1.3.6/slimlock.cpp 2014-03-30 19:01:04.115414201 +0200
|
||||||
@@ -106,13 +106,17 @@
|
@@ -106,13 +106,17 @@
|
||||||
unsigned int cfg_passwd_timeout;
|
unsigned int cfg_passwd_timeout;
|
||||||
// Read user's current theme
|
// Read user's current theme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user