Global replace /var/run/current-system -> /run/current-system

This commit is contained in:
Eelco Dolstra 2012-07-16 11:27:59 -04:00
parent 8c24de13e4
commit 73532c3855
21 changed files with 32 additions and 31 deletions

View File

@ -13,6 +13,7 @@ with pkgs.lib;
{ target = "shells"; { target = "shells";
source = pkgs.writeText "shells" source = pkgs.writeText "shells"
'' ''
/run/current-system/sw/bin/bash
/var/run/current-system/sw/bin/bash /var/run/current-system/sw/bin/bash
/bin/sh /bin/sh
''; '';

View File

@ -1,5 +1,5 @@
# This module defines the packages that appear in # This module defines the packages that appear in
# /var/run/current-system/sw. # /run/current-system/sw.
{ config, pkgs, ... }: { config, pkgs, ... }:
@ -69,7 +69,7 @@ let
example = "[ pkgs.icecat3 pkgs.thunderbird ]"; example = "[ pkgs.icecat3 pkgs.thunderbird ]";
description = '' description = ''
The set of packages that appear in The set of packages that appear in
/var/run/current-system/sw. These packages are /run/current-system/sw. These packages are
automatically available to all users, and are automatically available to all users, and are
automatically updated every time you rebuild the system automatically updated every time you rebuild the system
configuration. (The latter is the main difference with configuration. (The latter is the main difference with
@ -84,7 +84,7 @@ let
default = []; default = [];
example = ["/"]; example = ["/"];
description = " description = "
Lists directories to be symlinked in `/var/run/current-system/sw'. Lists directories to be symlinked in `/run/current-system/sw'.
"; ";
}; };
}; };

View File

@ -48,7 +48,7 @@ let
shell = mkOption { shell = mkOption {
type = with types; uniq string; type = with types; uniq string;
default = "/var/run/current-system/sw/sbin/nologin"; default = "/run/current-system/sw/sbin/nologin";
description = "The path to the user's shell."; description = "The path to the user's shell.";
}; };

View File

@ -312,7 +312,7 @@ in
# nixos-rebuild also requires a "system" profile and an # nixos-rebuild also requires a "system" profile and an
# /etc/NIXOS tag. # /etc/NIXOS tag.
touch /etc/NIXOS touch /etc/NIXOS
${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /var/run/current-system ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
''; '';
# Add vfat support to the initrd to enable people to copy the # Add vfat support to the initrd to enable people to copy the

View File

@ -50,7 +50,7 @@ in
# script and the top-level system configuration directory. # script and the top-level system configuration directory.
tarball.storeContents = tarball.storeContents =
[ { object = config.system.build.toplevel; [ { object = config.system.build.toplevel;
symlink = "/var/run/current-system"; symlink = "/run/current-system";
} }
]; ];
@ -87,6 +87,6 @@ in
# nixos-rebuild also requires a "system" profile and an # nixos-rebuild also requires a "system" profile and an
# /etc/NIXOS tag. # /etc/NIXOS tag.
touch /etc/NIXOS touch /etc/NIXOS
${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /var/run/current-system ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
''; '';
} }

View File

@ -48,9 +48,9 @@ in
config = mkIf crashdump.enable { config = mkIf crashdump.enable {
boot = { boot = {
postBootCommands = '' postBootCommands = ''
${pkgs.kexectools}/sbin/kexec -p /var/run/current-system/kernel \ ${pkgs.kexectools}/sbin/kexec -p /run/current-system/kernel \
--initrd=/var/run/current-system/initrd \ --initrd=/run/current-system/initrd \
--append="init=$(readlink -f /var/run/current-system/init) system=$(readlink -f /var/run/current-system) irqpoll maxcpus=1 reset_devices ${kernelParams}" --reset-vga --console-vga --append="init=$(readlink -f /run/current-system/init) system=$(readlink -f /run/current-system) irqpoll maxcpus=1 reset_devices ${kernelParams}" --reset-vga --console-vga
''; '';
kernelParams = [ kernelParams = [
"crashkernel=64M" "crashkernel=64M"

View File

@ -12,8 +12,8 @@ __ETC_PROFILE_SOURCED=1
export __ETC_PROFILE_DONE=1 export __ETC_PROFILE_DONE=1
# Initialise a bunch of environment variables. # Initialise a bunch of environment variables.
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
export LD_LIBRARY_PATH=/var/run/opengl-driver/lib:/var/run/opengl-driver-32/lib # !!! only set if needed export LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib # !!! only set if needed
export NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix export NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos=/etc/nixos/nixos:nixos-config=/etc/nixos/configuration.nix:services=/etc/nixos/services export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos=/etc/nixos/nixos:nixos-config=/etc/nixos/configuration.nix:services=/etc/nixos/services
export PAGER="less -R" export PAGER="less -R"
@ -22,7 +22,7 @@ export LOCATE_PATH=/var/cache/locatedb
# Include the various profiles in the appropriate environment variables. # Include the various profiles in the appropriate environment variables.
export NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/$USER export NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/$USER
export NIX_PROFILES="/var/run/current-system/sw /nix/var/nix/profiles/default $HOME/.nix-profile" export NIX_PROFILES="/run/current-system/sw /nix/var/nix/profiles/default $HOME/.nix-profile"
unset PATH INFOPATH PKG_CONFIG_PATH PERL5LIB ALSA_PLUGIN_DIRS GST_PLUGIN_PATH KDEDIRS unset PATH INFOPATH PKG_CONFIG_PATH PERL5LIB ALSA_PLUGIN_DIRS GST_PLUGIN_PATH KDEDIRS
unset QT_PLUGIN_PATH QTWEBKIT_PLUGIN_PATH STRIGI_PLUGIN_PATH XDG_CONFIG_DIRS XDG_DATA_DIRS unset QT_PLUGIN_PATH QTWEBKIT_PLUGIN_PATH STRIGI_PLUGIN_PATH XDG_CONFIG_DIRS XDG_DATA_DIRS

View File

@ -38,7 +38,7 @@ in
options = { options = {
users.defaultUserShell = pkgs.lib.mkOption { users.defaultUserShell = pkgs.lib.mkOption {
default = "/var/run/current-system/sw/bin/bash"; default = "/run/current-system/sw/bin/bash";
description = '' description = ''
This option defines the default shell assigned to user This option defines the default shell assigned to user
accounts. This must not be a store path, since the path is accounts. This must not be a store path, since the path is

View File

@ -130,7 +130,7 @@ in
script = script =
'' ''
export PATH=/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin export PATH=/run/current-system/sw/bin:/run/current-system/sw/sbin
export HOME=/root export HOME=/root
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts ${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts

View File

@ -86,8 +86,8 @@ in
[paths] [paths]
rrdtool = ${pkgs.rrdtool}/bin/rrdtool rrdtool = ${pkgs.rrdtool}/bin/rrdtool
loadavg_rrd = loadavg loadavg_rrd = loadavg
ps = /var/run/current-system/sw/bin/ps ps = /run/current-system/sw/bin/ps
df = /var/run/current-system/sw/bin/df df = /run/current-system/sw/bin/df
meminfo_rrd = meminfo meminfo_rrd = meminfo
uptime_rrd = uptime uptime_rrd = uptime
rrd_path = ${rrdDir} rrd_path = ${rrdDir}

View File

@ -44,7 +44,7 @@ let cfg = config.services.drbd; in
boot.extraModprobeConfig = boot.extraModprobeConfig =
'' ''
options drbd usermode_helper=/var/run/current-system/sw/sbin/drbdadm options drbd usermode_helper=/run/current-system/sw/sbin/drbdadm
''; '';
environment.etc = singleton environment.etc = singleton

View File

@ -70,7 +70,7 @@ let
environment = { environment = {
LD_LIBRARY_PATH = nssModulesPath; LD_LIBRARY_PATH = nssModulesPath;
TZ = config.time.timeZone; TZ = config.time.timeZone;
LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive"; LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
}; };
daemonType = "fork"; daemonType = "fork";

View File

@ -323,7 +323,7 @@ in
environment = { environment = {
LD_LIBRARY_PATH = nssModulesPath; LD_LIBRARY_PATH = nssModulesPath;
# Duplicated from bashrc. OpenSSH needs a patch for this. # Duplicated from bashrc. OpenSSH needs a patch for this.
LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive"; LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
}; };
path = [ pkgs.openssh pkgs.gnused ]; path = [ pkgs.openssh pkgs.gnused ];

View File

@ -87,7 +87,7 @@ in
fcrondeny = /etc/fcron.deny fcrondeny = /etc/fcron.deny
shell = /bin/sh shell = /bin/sh
sendmail = /var/setuid-wrappers/sendmail sendmail = /var/setuid-wrappers/sendmail
editor = /var/run/current-system/sw/bin/vi editor = /run/current-system/sw/bin/vi
''; '';
target = "fcron.conf"; target = "fcron.conf";
mode = "0600"; # max allowed is 644 mode = "0600"; # max allowed is 644
@ -104,7 +104,7 @@ in
startOn = "startup and filesystem"; startOn = "startup and filesystem";
environment = environment =
{ PATH = "/var/run/current-system/sw/bin"; { PATH = "/run/current-system/sw/bin";
}; };
preStart = preStart =

View File

@ -69,7 +69,7 @@ with pkgs.lib;
exec = "mingetty --loginprog=${pkgs.shadow}/bin/login --noclear ${tty}"; exec = "mingetty --loginprog=${pkgs.shadow}/bin/login --noclear ${tty}";
environment.LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive"; environment.LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
}) config.services.mingetty.ttys); }) config.services.mingetty.ttys);

View File

@ -106,7 +106,7 @@ in
mkdir -m 0755 -p /var/lib/kdm mkdir -m 0755 -p /var/lib/kdm
chown kdm /var/lib/kdm chown kdm /var/lib/kdm
${(optionalString (config.system.boot.loader.id == "grub") "PATH=${config.system.build.grub}/sbin:$PATH ") + ${(optionalString (config.system.boot.loader.id == "grub") "PATH=${config.system.build.grub}/sbin:$PATH ") +
"KDEDIRS=/var/run/current-system/sw exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon"} "KDEDIRS=/run/current-system/sw exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon"}
''; '';
logsXsession = true; logsXsession = true;
}; };

View File

@ -12,4 +12,4 @@ default-resolutions = 75,75,100,100
cache-hi-mark = 2048 cache-hi-mark = 2048
cache-low-mark = 1433 cache-low-mark = 1433
cache-balance = 70 cache-balance = 70
catalogue = /var/run/current-system/sw/share/X11-fonts/ catalogue = /run/current-system/sw/share/X11-fonts/

View File

@ -74,12 +74,12 @@ in
# Make this configuration the current configuration. # Make this configuration the current configuration.
# The readlink is there to ensure that when $systemConfig = /system # The readlink is there to ensure that when $systemConfig = /system
# (which is a symlink to the store), /var/run/current-system is still # (which is a symlink to the store), /run/current-system is still
# used as a garbage collection root. # used as a garbage collection root.
ln -sfn "$(readlink -f "$systemConfig")" /var/run/current-system ln -sfn "$(readlink -f "$systemConfig")" /run/current-system
# Prevent the current configuration from being garbage-collected. # Prevent the current configuration from being garbage-collected.
ln -sfn /var/run/current-system /nix/var/nix/gcroots/current-system ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
''; '';
}; };

View File

@ -59,7 +59,7 @@ fi
# Activate the new configuration. # Activate the new configuration.
if [ "$action" != switch -a "$action" != test ]; then exit 0; fi if [ "$action" != switch -a "$action" != test ]; then exit 0; fi
oldVersion=$(cat /var/run/current-system/upstart-interface-version 2> /dev/null || echo 0) oldVersion=$(cat /run/current-system/upstart-interface-version 2> /dev/null || echo 0)
newVersion=$(cat @out@/upstart-interface-version 2> /dev/null || echo 0) newVersion=$(cat @out@/upstart-interface-version 2> /dev/null || echo 0)
if test "$oldVersion" -ne "$newVersion"; then if test "$oldVersion" -ne "$newVersion"; then

View File

@ -189,4 +189,4 @@ fi
# Start Upstart's init. # Start Upstart's init.
echo "starting Upstart..." echo "starting Upstart..."
PATH=/var/run/current-system/upstart/sbin exec init --no-sessions ${debug2:+--verbose} PATH=/run/current-system/upstart/sbin exec init --no-sessions ${debug2:+--verbose}

View File

@ -65,7 +65,7 @@ in
script = '' script = ''
export LANG=${defaultLocale} export LANG=${defaultLocale}
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
export PATH=${pkgs.gzip}/bin:$PATH # Needed by setfont export PATH=${pkgs.gzip}/bin:$PATH # Needed by setfont
set +e # continue in case of errors set +e # continue in case of errors