8d731dacad
- Set the desktop background to the image ~/.background-image. - Depending on services.xserver.sessionType, start an xterm or a gnome-terminal as the "desktop" :-) * Upstart jobs can now declare extra packages to be added to the system path through the `extraPath' attribute. For instance, the ALSA job adds alsa-utils, and the X server job adds lots of stuff depending on the X configuration (e.g., xrandr, gnome-terminal, twm). * Create a cdrom/dvd symlink for SCSI sr? devices. svn path=/nixos/trunk/; revision=8221
42 lines
565 B
Nix
42 lines
565 B
Nix
{modprobe, alsaUtils}:
|
|
|
|
let
|
|
|
|
soundState = "/var/state/asound.state";
|
|
|
|
in
|
|
|
|
{
|
|
name = "alsa";
|
|
|
|
extraPath = [alsaUtils];
|
|
|
|
job = "
|
|
start on hardware-scan
|
|
stop on shutdown
|
|
|
|
start script
|
|
|
|
# Load some additional modules.
|
|
for mod in snd_pcm_oss; do
|
|
${modprobe}/sbin/modprobe $mod || true
|
|
done
|
|
|
|
# Restore the sound state.
|
|
${alsaUtils}/sbin/alsactl -f ${soundState} restore
|
|
|
|
end script
|
|
|
|
respawn sleep 1000000 # !!! hack
|
|
|
|
stop script
|
|
|
|
# Save the sound state.
|
|
${alsaUtils}/sbin/alsactl -f ${soundState} store
|
|
|
|
end script
|
|
|
|
";
|
|
|
|
}
|