* Tabs considered harmful.

svn path=/nixos/trunk/; revision=12407
This commit is contained in:
Eelco Dolstra 2008-07-23 14:13:27 +00:00
parent cc902c638c
commit 5ec1fa2060
21 changed files with 530 additions and 531 deletions

View File

@ -53,7 +53,7 @@ import ../helpers/make-etc.nix {
{ # Name Service Switch configuration file. Required by the C library. { # Name Service Switch configuration file. Required by the C library.
source = if config.services.avahi.nssmdns source = if config.services.avahi.nssmdns
then (assert config.services.avahi.enable; ./nsswitch-mdns.conf) then (assert config.services.avahi.enable; ./nsswitch-mdns.conf)
else ./nsswitch.conf; else ./nsswitch.conf;
target = "nsswitch.conf"; target = "nsswitch.conf";
} }

File diff suppressed because it is too large Load Diff

View File

@ -192,7 +192,7 @@ rec {
# Font aggregation # Font aggregation
fontDir = import ./fontdir.nix { fontDir = import ./fontdir.nix {
inherit config pkgs ; inherit config pkgs;
inherit (pkgs) builderDefs ttmkfdir; inherit (pkgs) builderDefs ttmkfdir;
inherit (pkgs.xorg) mkfontdir mkfontscale fontalias; inherit (pkgs.xorg) mkfontdir mkfontscale fontalias;
}; };
@ -330,17 +330,16 @@ rec {
bash = pkgs.bashInteractive; bash = pkgs.bashInteractive;
adjustSetuidOwner = pkgs.lib.concatStrings (map adjustSetuidOwner = pkgs.lib.concatStrings (map
(_entry:let entry = { (_entry: let entry = {
owner = "nobody"; owner = "nobody";
group = "nogroup"; group = "nogroup";
setuid = false; setuid = false;
setgid = false; setgid = false;
} //_entry; in } //_entry; in
'' ''
chown ${entry.owner}.${entry.group} $wrapperDir/${entry.program} chown ${entry.owner}.${entry.group} $wrapperDir/${entry.program}
chmod u${if entry.setuid then "+" else "-"}s $wrapperDir/${entry.program} chmod u${if entry.setuid then "+" else "-"}s $wrapperDir/${entry.program}
chmod g${if entry.setgid then "+" else "-"}s $wrapperDir/${entry.program} chmod g${if entry.setgid then "+" else "-"}s $wrapperDir/${entry.program}
'') '')
config.security.setuidOwners); config.security.setuidOwners);
}; };
@ -411,7 +410,7 @@ rec {
config.nesting.children; config.nesting.children;
configurationName = config.boot.configurationName; configurationName = config.boot.configurationName;
}) (pkgs.lib.getAttr ["environment" "checkConfigurationOptions"] }) (pkgs.lib.getAttr ["environment" "checkConfigurationOptions"]
optionDeclarations.environment.checkConfigurationOptions.default optionDeclarations.environment.checkConfigurationOptions.default
configuration) configuration)
optionDeclarations configuration ; optionDeclarations configuration;
} }

View File

@ -26,23 +26,23 @@ let
(_entry:let entry={master=true;slaves=[];masters=[];}//_entry; in (_entry:let entry={master=true;slaves=[];masters=[];}//_entry; in
'' ''
zone "${entry.name}" { zone "${entry.name}" {
type ${if entry.master then "master" else "slave"}; type ${if entry.master then "master" else "slave"};
file "${entry.file}"; file "${entry.file}";
${ if entry.master then ${ if entry.master then
'' ''
allow-transfer { allow-transfer {
${concatMapStrings (ip: ip+";\n") entry.slaves} ${concatMapStrings (ip: ip+";\n") entry.slaves}
}; };
'' ''
else else
'' ''
masters { masters {
${concatMapStrings (ip: ip+";\n") entry.masters} ${concatMapStrings (ip: ip+";\n") entry.masters}
}; };
'' ''
} }
allow-query { any; }; allow-query { any; };
}; };
'' ''
) )
cfg.zones cfg.zones

View File

@ -97,7 +97,7 @@ let
++ pkgs.lib.optional config.networking.enableIntel4965AGNFirmware pkgs.iwlwifi4965ucode ++ pkgs.lib.optional config.networking.enableIntel4965AGNFirmware pkgs.iwlwifi4965ucode
++ pkgs.lib.optional config.networking.enableZydasZD1211Firmware pkgs.zd1211fw ++ pkgs.lib.optional config.networking.enableZydasZD1211Firmware pkgs.zd1211fw
++ pkgs.lib.optional config.hardware.enableGo7007 "${kernelPackages.wis_go7007}/firmware" ++ pkgs.lib.optional config.hardware.enableGo7007 "${kernelPackages.wis_go7007}/firmware"
++ config.services.udev.addFirmware; ++ config.services.udev.addFirmware;
extraUdevPkgs = extraUdevPkgs =
pkgs.lib.optional config.services.hal.enable pkgs.hal pkgs.lib.optional config.services.hal.enable pkgs.hal
++ pkgs.lib.optional config.hardware.enableGo7007 kernelPackages.wis_go7007; ++ pkgs.lib.optional config.hardware.enableGo7007 kernelPackages.wis_go7007;
@ -349,10 +349,10 @@ let
(import ../upstart-jobs/dbus.nix { (import ../upstart-jobs/dbus.nix {
inherit (pkgs) stdenv dbus; inherit (pkgs) stdenv dbus;
dbusServices = dbusServices =
pkgs.lib.optional (config.services.hal.enable) pkgs.hal ++ pkgs.lib.optional config.services.hal.enable pkgs.hal ++
pkgs.lib.optional (config.services.avahi.enable) pkgs.avahi ++ pkgs.lib.optional config.services.avahi.enable pkgs.avahi ++
pkgs.lib.optional (config.services.disnix.enable) pkgs.disnix pkgs.lib.optional config.services.disnix.enable pkgs.disnix
; ;
}) })
# HAL daemon. # HAL daemon.

View File

@ -49,8 +49,8 @@ let
confFile = pkgs.writeText "dovecot.conf" dovecotConf; confFile = pkgs.writeText "dovecot.conf" dovecotConf;
pamdFile = pkgs.writeText "dovecot.pam" '' pamdFile = pkgs.writeText "dovecot.pam" ''
auth include common auth include common
account include common account include common
''; '';
in in

View File

@ -15,13 +15,13 @@ in
stop on network-interfaces/stop stop on network-interfaces/stop
start script start script
# Initialise state data # Initialise state data
mkdir -p ${cfg.logsDir} mkdir -p ${cfg.logsDir}
if ! test -d ${cfg.spoolDir} if ! test -d ${cfg.spoolDir}
then then
cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib
fi fi
end script end script
respawn ${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin; cd ~; ejabberdctl --logs ${cfg.logsDir} --spool ${cfg.spoolDir} start; sleep 1d' respawn ${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin; cd ~; ejabberdctl --logs ${cfg.logsDir} --spool ${cfg.spoolDir} start; sleep 1d'

View File

@ -50,7 +50,7 @@ script
isPseudo= isPseudo=
if test \"$fsType\" = \"nfs\" || test \"$fsType\" = \"tmpfs\" || if test \"$fsType\" = \"nfs\" || test \"$fsType\" = \"tmpfs\" ||
test \"$fsType\" = \"ext3cow\"; then isPseudo=1; fi test \"$fsType\" = \"ext3cow\"; then isPseudo=1; fi
if ! test -n \"$isLabel\" -o -n \"$isPseudo\" -o -e \"$device\"; then if ! test -n \"$isLabel\" -o -n \"$isPseudo\" -o -e \"$device\"; then
echo \"skipping $device, doesn't exist (yet)\" echo \"skipping $device, doesn't exist (yet)\"

View File

@ -1,27 +1,27 @@
{config, pkgs}: {config, pkgs}:
let let
cfg = config.services.gw6c; cfg = config.services.gw6c;
procps = pkgs.procps; procps = pkgs.procps;
gw6cService = import ../services/gw6c { gw6cService = import ../services/gw6c {
inherit (pkgs) stdenv gw6c coreutils inherit (pkgs) stdenv gw6c coreutils
procps upstart iputils gnused procps upstart iputils gnused
gnugrep seccureUser writeScript; gnugrep seccureUser writeScript;
username = cfg.username; username = cfg.username;
password = cfg.password; password = cfg.password;
server = cfg.server; server = cfg.server;
keepAlive = cfg.keepAlive; keepAlive = cfg.keepAlive;
everPing = cfg.everPing; everPing = cfg.everPing;
seccureKeys = config.security.seccureKeys; seccureKeys = config.security.seccureKeys;
waitPingableBroker = cfg.waitPingableBroker; waitPingableBroker = cfg.waitPingableBroker;
}; };
in in
{ {
name = "gw6c"; name = "gw6c";
users = []; users = [];
groups = []; groups = [];
job = " job = "
description \"Gateway6 client\" description \"Gateway6 client\"
start on ${ if cfg.autorun then "network-interfaces/started" else "never" } start on ${ if cfg.autorun then "network-interfaces/started" else "never" }

View File

@ -1,33 +1,33 @@
{config, pkgs}: {config, pkgs}:
let let
cfg = config.services.ircdHybrid; cfg = config.services.ircdHybrid;
ircdService = import ../services/ircd-hybrid { ircdService = import ../services/ircd-hybrid {
stdenv = pkgs.stdenv; stdenv = pkgs.stdenv;
inherit (pkgs) ircdHybrid coreutils inherit (pkgs) ircdHybrid coreutils
su iproute gnugrep procps; su iproute gnugrep procps;
serverName = cfg.serverName; serverName = cfg.serverName;
sid = cfg.sid; sid = cfg.sid;
description = cfg.description; description = cfg.description;
rsaKey = cfg.rsaKey; rsaKey = cfg.rsaKey;
certificate = cfg.certificate; certificate = cfg.certificate;
adminEmail = cfg.adminEmail; adminEmail = cfg.adminEmail;
extraIPs = cfg.extraIPs; extraIPs = cfg.extraIPs;
extraPort = cfg.extraPort; extraPort = cfg.extraPort;
gw6cEnabled = (config.services.gw6c.enable) && gw6cEnabled = (config.services.gw6c.enable) &&
(config.services.gw6c.autorun); (config.services.gw6c.autorun);
}; };
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces"; startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
in in
{ {
name = "ircd-hybrid"; name = "ircd-hybrid";
users = [ { users = [ {
name = "ircd"; name = "ircd";
description = "IRCD owner."; description = "IRCD owner.";
} ]; } ];
groups = [{name = "ircd";}]; groups = [{name = "ircd";}];
job = " job = "
description = \"IRCD Hybrid server.\" description = \"IRCD Hybrid server.\"
start on ${startingDependency}/started start on ${startingDependency}/started

View File

@ -4,18 +4,18 @@ let
cfg = config.services.jboss; cfg = config.services.jboss;
jbossService = import ../services/jboss { jbossService = import ../services/jboss {
inherit (pkgs) stdenv jboss su; inherit (pkgs) stdenv jboss su;
inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK; inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK;
}; };
in in
{ {
name = "jboss"; name = "jboss";
job = " job = "
description \"JBoss server\" description \"JBoss server\"
stop on shutdown stop on shutdown
respawn ${jbossService}/bin/control start respawn ${jbossService}/bin/control start
"; ";
} }

View File

@ -26,7 +26,7 @@ start script
if ! test -f "${hostKey}" if ! test -f "${hostKey}"
then then
${lsh}/bin/lsh-keygen --server | \ ${lsh}/bin/lsh-keygen --server | \
${lsh}/bin/lsh-writekey --server -o "${hostKey}" ${lsh}/bin/lsh-writekey --server -o "${hostKey}"
fi fi
end script end script
@ -47,7 +47,7 @@ respawn ${lsh}/sbin/lshd --daemonic \
--subsystems=${concatStringsSep "," --subsystems=${concatStringsSep ","
(map (pair: (head pair) + "=" + (map (pair: (head pair) + "=" +
(head (tail pair))) (head (tail pair)))
subsystems)} subsystems)}
''; '';
} }

View File

@ -26,8 +26,8 @@ with pkgs;
mkdir /etc/openfire || true mkdir /etc/openfire || true
for i in ${openfire}/conf.inst/*; do for i in ${openfire}/conf.inst/*; do
if ! test -f /etc/openfire/$(basename $i); then if ! test -f /etc/openfire/$(basename $i); then
cp $i /etc/openfire/ cp $i /etc/openfire/
fi fi
done done
openfire start openfire start
end script end script

View File

@ -138,13 +138,13 @@ in
${pkgs.coreutils}/bin/mkdir -p /var/spool/mail /var/postfix/conf /var/postfix/queue ${pkgs.coreutils}/bin/mkdir -p /var/spool/mail /var/postfix/conf /var/postfix/queue
fi fi
${pkgs.coreutils}/bin/chown -R ${user}.${group} /var/postfix ${pkgs.coreutils}/bin/chown -R ${user}.${group} /var/postfix
${pkgs.coreutils}/bin/chown -R ${user}.${setgidGroup} /var/postfix/queue ${pkgs.coreutils}/bin/chown -R ${user}.${setgidGroup} /var/postfix/queue
${pkgs.coreutils}/bin/chmod -R ug+rwX /var/postfix/queue ${pkgs.coreutils}/bin/chmod -R ug+rwX /var/postfix/queue
${pkgs.coreutils}/bin/chown root.root /var/spool/mail ${pkgs.coreutils}/bin/chown root.root /var/spool/mail
${pkgs.coreutils}/bin/chmod a+rwxt /var/spool/mail ${pkgs.coreutils}/bin/chmod a+rwxt /var/spool/mail
ln -sf ${pkgs.postfix}/share/postfix/conf/* /var/postfix/conf ln -sf ${pkgs.postfix}/share/postfix/conf/* /var/postfix/conf
ln -sf ${aliasesFile} /var/postfix/conf/aliases ln -sf ${aliasesFile} /var/postfix/conf/aliases
ln -sf ${mainCfFile} /var/postfix/conf/main.cf ln -sf ${mainCfFile} /var/postfix/conf/main.cf

View File

@ -36,7 +36,7 @@ in
start script start script
if ! test -e ${cfg.dataDir}; then if ! test -e ${cfg.dataDir}; then
mkdir -m 0700 -p ${cfg.dataDir} mkdir -m 0700 -p ${cfg.dataDir}
chown -R postgres ${cfg.dataDir} chown -R postgres ${cfg.dataDir}
${run} -c '${postgresql}/bin/initdb -D ${cfg.dataDir} -U root' ${run} -c '${postgresql}/bin/initdb -D ${cfg.dataDir} -U root'
fi fi

View File

@ -28,56 +28,56 @@ in
stop on network-interfaces/stop stop on network-interfaces/stop
start script start script
# Create initial state data # Create initial state data
if ! test -d ${cfg.baseDir} if ! test -d ${cfg.baseDir}
then then
mkdir -p ${cfg.baseDir}/webapps mkdir -p ${cfg.baseDir}/webapps
mkdir -p ${cfg.baseDir}/shared mkdir -p ${cfg.baseDir}/shared
cp -av ${pkgs.tomcat6}/{conf,temp,logs} ${cfg.baseDir} cp -av ${pkgs.tomcat6}/{conf,temp,logs} ${cfg.baseDir}
fi fi
# Deploy all webapplications # Deploy all webapplications
if ! test "${cfg.deployFrom}" = "" if ! test "${cfg.deployFrom}" = ""
then then
rm -rf ${cfg.baseDir}/webapps rm -rf ${cfg.baseDir}/webapps
mkdir -p ${cfg.baseDir}/webapps mkdir -p ${cfg.baseDir}/webapps
for i in ${cfg.deployFrom}/* for i in ${cfg.deployFrom}/*
do do
cp -rL $i ${cfg.baseDir}/webapps cp -rL $i ${cfg.baseDir}/webapps
done done
fi fi
# Fix permissions # Fix permissions
chown -R ${cfg.user} ${cfg.baseDir} chown -R ${cfg.user} ${cfg.baseDir}
for i in `find ${cfg.baseDir} -type d` for i in `find ${cfg.baseDir} -type d`
do do
chmod -v 755 $i chmod -v 755 $i
done done
for i in `find ${cfg.baseDir} -type f` for i in `find ${cfg.baseDir} -type f`
do do
chmod -v 644 $i chmod -v 644 $i
done done
# Deploy all shared libraries # Deploy all shared libraries
if ! test "${cfg.sharedLibFrom}" = "" if ! test "${cfg.sharedLibFrom}" = ""
then then
rm -f ${cfg.baseDir}/shared/lib rm -f ${cfg.baseDir}/shared/lib
ln -s ${cfg.sharedLibFrom} ${cfg.baseDir}/shared/lib ln -s ${cfg.sharedLibFrom} ${cfg.baseDir}/shared/lib
fi fi
end script end script
respawn ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" ${pkgs.tomcat6}/bin/startup.sh; sleep 1d' respawn ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" ${pkgs.tomcat6}/bin/startup.sh; sleep 1d'
stop script stop script
echo "Stopping tomcat..." echo "Stopping tomcat..."
CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${pkgs.tomcat6}/bin/shutdown.sh CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${pkgs.tomcat6}/bin/shutdown.sh
end script end script
''; '';
} }

View File

@ -26,32 +26,32 @@ rec {
start script start script
# Critical: tell the kernel where to find splash_helper. It calls # Critical: tell the kernel where to find splash_helper. It calls
# this program every time we switch between consoles. # this program every time we switch between consoles.
echo ${splashutils}/${splashutils.helperName} > ${splashutils.helperProcFile} echo ${splashutils}/${splashutils.helperName} > ${splashutils.helperProcFile}
# For each console... # For each console...
for tty in ${toString (map (x: x.tty) backgrounds)}; do for tty in ${toString (map (x: x.tty) backgrounds)}; do
# Make sure that the console exists. # Make sure that the console exists.
echo -n "" > /dev/tty$tty echo -n "" > /dev/tty$tty
# Set the theme as determined by tty-backgrounds-combine.sh # Set the theme as determined by tty-backgrounds-combine.sh
# above. # above.
theme=$(readlink ${themesUnpacked}/$tty) theme=$(readlink ${themesUnpacked}/$tty)
${splashutils}/${splashutils.controlName} --tty $tty -c setcfg -t $theme || true ${splashutils}/${splashutils.controlName} --tty $tty -c setcfg -t $theme || true
${splashutils}/${splashutils.controlName} --tty $tty -c setpic -t $theme || true ${splashutils}/${splashutils.controlName} --tty $tty -c setpic -t $theme || true
${splashutils}/${splashutils.controlName} --tty $tty -c on || true ${splashutils}/${splashutils.controlName} --tty $tty -c on || true
done done
end script end script
respawn sleep 10000 # !!! Hack respawn sleep 10000 # !!! Hack
stop script stop script
# Disable the theme on each console. # Disable the theme on each console.
for tty in ${toString (map (x: x.tty) backgrounds)}; do for tty in ${toString (map (x: x.tty) backgrounds)}; do
${splashutils}/${splashutils.controlName} --tty $tty -c off || true ${splashutils}/${splashutils.controlName} --tty $tty -c off || true
done done
end script end script
''; '';

View File

@ -19,7 +19,7 @@ let
# Miscellaneous devices. # Miscellaneous devices.
KERNEL=="sonypi", MODE="0666" KERNEL=="sonypi", MODE="0666"
KERNEL=="kvm", MODE="0666" KERNEL=="kvm", MODE="0666"
KERNEL=="kqemu", NAME="%k", MODE="0666" KERNEL=="kqemu", NAME="%k", MODE="0666"
# Create a symlink for the CD-ROM device. # Create a symlink for the CD-ROM device.
#KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" #KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k"
@ -51,11 +51,11 @@ let
'' ''
substituteInPlace $out/80-drivers.rules \ substituteInPlace $out/80-drivers.rules \
--replace /sbin/modprobe ${modprobe}/sbin/modprobe --replace /sbin/modprobe ${modprobe}/sbin/modprobe
'' ''
else else
'' ''
rm $out/80-drivers.rules rm $out/80-drivers.rules
'' ''
} }
for i in ${toString extraUdevPkgs}; do for i in ${toString extraUdevPkgs}; do
for j in $i/etc/udev/rules.d/*; do for j in $i/etc/udev/rules.d/*; do
@ -92,10 +92,10 @@ in
env UDEV_CONFIG_FILE=${conf} env UDEV_CONFIG_FILE=${conf}
start script start script
echo "" > /proc/sys/kernel/hotplug echo "" > /proc/sys/kernel/hotplug
# Get rid of possible old udev processes. # Get rid of possible old udev processes.
${procps}/bin/pkill -u root "^udevd$" || true ${procps}/bin/pkill -u root "^udevd$" || true
# Do the loading of additional stage 2 kernel modules. # Do the loading of additional stage 2 kernel modules.
# Maybe this isn't the best place... # Maybe this isn't the best place...
@ -104,30 +104,30 @@ in
${modprobe}/sbin/modprobe $i || true ${modprobe}/sbin/modprobe $i || true
done done
# Start udev. # Start udev.
${udev}/sbin/udevd --daemon ${udev}/sbin/udevd --daemon
# Let udev create device nodes for all modules that have already # Let udev create device nodes for all modules that have already
# been loaded into the kernel (or for which support is built into # been loaded into the kernel (or for which support is built into
# the kernel). # the kernel).
if ! test -e ${devicesCreated}; then if ! test -e ${devicesCreated}; then
${udev}/sbin/udevadm trigger ${udev}/sbin/udevadm trigger
${udev}/sbin/udevadm settle # wait for udev to finish ${udev}/sbin/udevadm settle # wait for udev to finish
touch ${devicesCreated} touch ${devicesCreated}
fi fi
# Kill udev, let Upstart restart and monitor it. (This is nasty, # Kill udev, let Upstart restart and monitor it. (This is nasty,
# but we have to run `udevadm trigger' first. Maybe we can use # but we have to run `udevadm trigger' first. Maybe we can use
# Upstart's `binary' keyword, but it isn't implemented yet.) # Upstart's `binary' keyword, but it isn't implemented yet.)
if ! ${procps}/bin/pkill -u root "^udevd$"; then if ! ${procps}/bin/pkill -u root "^udevd$"; then
echo "couldn't stop udevd" echo "couldn't stop udevd"
fi fi
while ${procps}/bin/pgrep -u root "^udevd$"; do while ${procps}/bin/pgrep -u root "^udevd$"; do
sleep 1 sleep 1
done done
initctl emit new-devices initctl emit new-devices
end script end script
respawn ${udev}/sbin/udevd respawn ${udev}/sbin/udevd

View File

@ -1,20 +1,20 @@
{ {
pkgs, config pkgs, config
}: }:
if ! config.fonts.enableFontDir then abort "Please enable fontDir (fonts.enableFontDir) to use xfs." else if ! config.fonts.enableFontDir then abort "Please enable fontDir (fonts.enableFontDir) to use xfs." else
let let
configFile = ./xfs.conf; configFile = ./xfs.conf;
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces"; startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
in in
rec { rec {
name = "xfs"; name = "xfs";
groups = []; groups = [];
users = []; users = [];
job = " job = "
description \"X Font Server\" description \"X Font Server\"
start on ${startingDependency}/started start on ${startingDependency}/started
stop on shutdown stop on shutdown
respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile} respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile}
"; ";
} }

View File

@ -98,7 +98,7 @@ let
if cfg.useInternalAGPGART == "yes" then if cfg.useInternalAGPGART == "yes" then
'' Option "UseInternalAGPGART" "yes"'' '' Option "UseInternalAGPGART" "yes"''
else if cfg.useInternalAGPGART == "no" then else if cfg.useInternalAGPGART == "no" then
'' Option "UseInternalAGPGART" "no"'' '' Option "UseInternalAGPGART" "no"''
else ""; else "";
extraDeviceConfig = cfg.extraDeviceConfig; extraDeviceConfig = cfg.extraDeviceConfig;
@ -141,7 +141,7 @@ let
export screen=' export screen='
Option "AddARGBGLXVisuals" "true" Option "AddARGBGLXVisuals" "true"
Option "DisableGLXRootClipping" "true" Option "DisableGLXRootClipping" "true"
Option "RandRRotation" "on" Option "RandRRotation" "on"
' '
export device=' export device='
@ -385,7 +385,7 @@ rec {
then '' then ''
ln -sf ${kernelPackages.nvidiaDrivers} /var/run/opengl-driver ln -sf ${kernelPackages.nvidiaDrivers} /var/run/opengl-driver
'' ''
else if cfg.driSupport else if cfg.driSupport
then "ln -sf ${pkgs.mesa} /var/run/opengl-driver" then "ln -sf ${pkgs.mesa} /var/run/opengl-driver"
else "" else ""
} }