mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Changes to xserver to export configuration and to allow not to run the job on boot, changes to filesystems job to autocreate some mountpoints (/dev/shm..)
svn path=/nixos/trunk/; revision=9987
This commit is contained in:
parent
ae6104ae59
commit
55b977dcbf
@ -154,6 +154,8 @@ let
|
||||
libXext = pkgs.xlibs.libXext;
|
||||
fontDirectories = import ../system/fonts.nix {inherit pkgs config;};
|
||||
isClone = config.services.xserver.isClone;
|
||||
autorun = config.services.xserver.autorun;
|
||||
exportConfiguration = config.services.xserver.exportConfiguration;
|
||||
})
|
||||
|
||||
# Apache httpd.
|
||||
|
@ -7,6 +7,7 @@ let
|
||||
devices = map (fs: if fs ? device then fs.device else "LABEL=" + fs.label) fileSystems;
|
||||
fsTypes = map (fs: if fs ? fsType then fs.fsType else "auto") fileSystems;
|
||||
optionss = map (fs: if fs ? options then fs.options else "defaults") fileSystems;
|
||||
autocreates = map (fs: if fs ? autocreate then fs.autocreate else "0") fileSystems;
|
||||
|
||||
in
|
||||
|
||||
@ -25,6 +26,7 @@ script
|
||||
devices=(${toString devices})
|
||||
fsTypes=(${toString fsTypes})
|
||||
optionss=(${toString optionss})
|
||||
autocreates=(${toString autocreates})
|
||||
|
||||
newDevices=1
|
||||
|
||||
@ -41,12 +43,14 @@ script
|
||||
device=\${devices[$n]}
|
||||
fsType=\${fsTypes[$n]}
|
||||
options=\${optionss[$n]}
|
||||
autocreate=\${autocreates[$n]}
|
||||
|
||||
isLabel=
|
||||
if echo \"$device\" | grep -q '^LABEL='; then isLabel=1; fi
|
||||
|
||||
isPseudo=
|
||||
if test \"$fsType\" = \"nfs\" || test \"$fsType\" = \"ext3cow\"; then isPseudo=1; fi
|
||||
if test \"$fsType\" = \"nfs\" || test \"$fsType\" = \"tmpfs\" ||
|
||||
test \"$fsType\" = \"ext3cow\"; then isPseudo=1; fi
|
||||
|
||||
if ! test -n \"$isLabel\" -o -n \"$isPseudo\" -o -e \"$device\"; then
|
||||
echo \"skipping $device, doesn't exist (yet)\"
|
||||
@ -100,6 +104,8 @@ script
|
||||
fsck -a \"$device\" || true
|
||||
fi
|
||||
|
||||
if test \"\$autocreate\" = 1; then mkdir -p \"\$mountPoint\"; fi
|
||||
|
||||
if ${utillinux}/bin/mount -t \"$fsType\" -o \"$options\" \"$device\" \"$mountPoint\"; then
|
||||
newDevices=1
|
||||
fi
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
, # Is Clone mode on?
|
||||
isClone ? "on"
|
||||
|
||||
, # Do we want it to run or just to prepare everything?
|
||||
autorun ? true
|
||||
|
||||
, # Create unneeded links in /etc?
|
||||
exportConfiguration ? false
|
||||
}:
|
||||
|
||||
let
|
||||
@ -364,11 +370,18 @@ rec {
|
||||
optional (sessionType == "kde")
|
||||
{ source = "${xkeyboard_config}/etc/X11/xkb";
|
||||
target = "X11/xkb";
|
||||
};
|
||||
}
|
||||
++
|
||||
optional (exportConfiguration)
|
||||
{
|
||||
source = "${configFile}";
|
||||
target = "X11/xorg.conf";
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
job = "
|
||||
start on network-interfaces
|
||||
start on ${if autorun then "network-interfaces" else "never"}
|
||||
|
||||
start script
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user