* Moved the guest-users.nix module to modules/config. Clearing the

passwords is now done in an activation scriptlet rather than an
  Upstart job (not tested).  BTW, we should get rid of this module and
  add support to the users-groups.nix module for creating accounts
  with an empty password.

svn path=/nixos/branches/modular-nixos/; revision=15769
This commit is contained in:
Eelco Dolstra 2009-05-28 14:37:30 +00:00
parent 29611e49fd
commit fdbe09e914
4 changed files with 24 additions and 29 deletions

View file

@ -1,6 +1,7 @@
{pkgs, config, ...}:
{pkgs, config, ...}:
let
inherit(pkgs.lib) mkOption;
inherit (pkgs.lib) mkOption;
options = {
services = {
@ -53,26 +54,15 @@ in
{
require = options;
services = {
# !!! Better to do this as an activation script plugin rather
# than an Upstart job.
extraJobs = optional enable {
name = "clear-passwords";
job = ''
description "Clear guest passwords"
start on startup
script
for i in ${nameString}; do
echo | ${pkgs.pwdutils}/bin/passwd --stdin $i
done
end script
'';
};
mingetty = {
helpLine = optionalString enable "\nThese users have empty passwords: ${nameString}";
};
};
users = {
extraUsers = map userEntry users;
};
system.activationScripts = pkgs.lib.fullDepEntry
''
for i in ${nameString}; do
echo | ${pkgs.pwdutils}/bin/passwd --stdin $i
done
'' ["defaultPath" "users" "groups"];
services.mingetty.helpLine = optionalString enable "\nThese users have empty passwords: ${nameString}";
users.extraUsers = map userEntry users;
}

View file

@ -5,7 +5,6 @@
../system/nixos-installer.nix
../upstart-jobs/cron/locate.nix
../upstart-jobs/filesystems.nix
../upstart-jobs/guest-users.nix
../upstart-jobs/kbd.nix
../upstart-jobs/ldap
../upstart-jobs/lvm.nix

View file

@ -1,5 +1,6 @@
[ # This file has been generated by gen-module-list.sh
./config/fonts.nix
./config/guest-users.nix
./config/i18n.nix
./config/networking.nix
./config/nsswitch.nix
@ -118,6 +119,11 @@
./system/boot/stage-1.nix
./system/boot/stage-2.nix
./system/etc/etc.nix
##### ./system/etc/make-etc.nix
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
# while evaluating the function at `(string):3:22':
# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/system/etc/make-etc.nix:1:2':
# the argument named `stdenv' required by the function is missing
./system/upstart-events/ctrl-alt-delete.nix
./system/upstart-events/halt.nix
./system/upstart-events/maintenance-shell.nix

View file

@ -4,9 +4,9 @@
let
inherit (pkgs.lib) mkOption;
options = { services = { xserver = { displayManager = {
options = {
kdm = {
services.xserver.displayManager.kdm = {
enable = mkOption {
default = false;
description = "
@ -15,7 +15,7 @@ let
};
};
}; /* displayManager */ }; /* xserver */ }; /* services */ };
};
in
@ -31,7 +31,7 @@ let
kdmrc = stdenv.mkDerivation {
name = "kdmrc";
# -e "s|Session=${kdebase_workspace}/share/config/kdm/Xsession|Session=${dmcfg.session.script}|" \
# -e "s|Session=${kdebase_workspace}/share/config/kdm/Xsession|Session=${dmcfg.session.script}|" \
buildCommand = ''
cp ${kdebase_workspace}/share/config/kdm/kdmrc .
sed -i -e "s|#HaltCmd=|HaltCmd=${pkgs.upstart}/sbin/halt|" \