Global replace /var/run/current-system -> /run/current-system
This commit is contained in:
parent
8c24de13e4
commit
73532c3855
|
@ -13,6 +13,7 @@ with pkgs.lib;
|
|||
{ target = "shells";
|
||||
source = pkgs.writeText "shells"
|
||||
''
|
||||
/run/current-system/sw/bin/bash
|
||||
/var/run/current-system/sw/bin/bash
|
||||
/bin/sh
|
||||
'';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This module defines the packages that appear in
|
||||
# /var/run/current-system/sw.
|
||||
# /run/current-system/sw.
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
|
@ -69,7 +69,7 @@ let
|
|||
example = "[ pkgs.icecat3 pkgs.thunderbird ]";
|
||||
description = ''
|
||||
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 updated every time you rebuild the system
|
||||
configuration. (The latter is the main difference with
|
||||
|
@ -84,7 +84,7 @@ let
|
|||
default = [];
|
||||
example = ["/"];
|
||||
description = "
|
||||
Lists directories to be symlinked in `/var/run/current-system/sw'.
|
||||
Lists directories to be symlinked in `/run/current-system/sw'.
|
||||
";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ let
|
|||
|
||||
shell = mkOption {
|
||||
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.";
|
||||
};
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ in
|
|||
# nixos-rebuild also requires a "system" profile and an
|
||||
# /etc/NIXOS tag.
|
||||
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
|
||||
|
|
|
@ -50,7 +50,7 @@ in
|
|||
# script and the top-level system configuration directory.
|
||||
tarball.storeContents =
|
||||
[ { 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
|
||||
# /etc/NIXOS tag.
|
||||
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
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -48,9 +48,9 @@ in
|
|||
config = mkIf crashdump.enable {
|
||||
boot = {
|
||||
postBootCommands = ''
|
||||
${pkgs.kexectools}/sbin/kexec -p /var/run/current-system/kernel \
|
||||
--initrd=/var/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
|
||||
${pkgs.kexectools}/sbin/kexec -p /run/current-system/kernel \
|
||||
--initrd=/run/current-system/initrd \
|
||||
--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 = [
|
||||
"crashkernel=64M"
|
||||
|
|
|
@ -12,8 +12,8 @@ __ETC_PROFILE_SOURCED=1
|
|||
export __ETC_PROFILE_DONE=1
|
||||
|
||||
# Initialise a bunch of environment variables.
|
||||
export LOCALE_ARCHIVE=/var/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 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
|
||||
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 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"
|
||||
|
@ -22,7 +22,7 @@ export LOCATE_PATH=/var/cache/locatedb
|
|||
|
||||
# Include the various profiles in the appropriate environment variables.
|
||||
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 QT_PLUGIN_PATH QTWEBKIT_PLUGIN_PATH STRIGI_PLUGIN_PATH XDG_CONFIG_DIRS XDG_DATA_DIRS
|
||||
|
|
|
@ -38,7 +38,7 @@ in
|
|||
options = {
|
||||
|
||||
users.defaultUserShell = pkgs.lib.mkOption {
|
||||
default = "/var/run/current-system/sw/bin/bash";
|
||||
default = "/run/current-system/sw/bin/bash";
|
||||
description = ''
|
||||
This option defines the default shell assigned to user
|
||||
accounts. This must not be a store path, since the path is
|
||||
|
|
|
@ -130,7 +130,7 @@ in
|
|||
|
||||
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
|
||||
|
||||
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts
|
||||
|
|
|
@ -86,8 +86,8 @@ in
|
|||
[paths]
|
||||
rrdtool = ${pkgs.rrdtool}/bin/rrdtool
|
||||
loadavg_rrd = loadavg
|
||||
ps = /var/run/current-system/sw/bin/ps
|
||||
df = /var/run/current-system/sw/bin/df
|
||||
ps = /run/current-system/sw/bin/ps
|
||||
df = /run/current-system/sw/bin/df
|
||||
meminfo_rrd = meminfo
|
||||
uptime_rrd = uptime
|
||||
rrd_path = ${rrdDir}
|
||||
|
|
|
@ -44,7 +44,7 @@ let cfg = config.services.drbd; in
|
|||
|
||||
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
|
||||
|
|
|
@ -70,7 +70,7 @@ let
|
|||
environment = {
|
||||
LD_LIBRARY_PATH = nssModulesPath;
|
||||
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";
|
||||
|
|
|
@ -323,7 +323,7 @@ in
|
|||
environment = {
|
||||
LD_LIBRARY_PATH = nssModulesPath;
|
||||
# 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 ];
|
||||
|
|
|
@ -87,7 +87,7 @@ in
|
|||
fcrondeny = /etc/fcron.deny
|
||||
shell = /bin/sh
|
||||
sendmail = /var/setuid-wrappers/sendmail
|
||||
editor = /var/run/current-system/sw/bin/vi
|
||||
editor = /run/current-system/sw/bin/vi
|
||||
'';
|
||||
target = "fcron.conf";
|
||||
mode = "0600"; # max allowed is 644
|
||||
|
@ -104,7 +104,7 @@ in
|
|||
startOn = "startup and filesystem";
|
||||
|
||||
environment =
|
||||
{ PATH = "/var/run/current-system/sw/bin";
|
||||
{ PATH = "/run/current-system/sw/bin";
|
||||
};
|
||||
|
||||
preStart =
|
||||
|
|
|
@ -69,7 +69,7 @@ with pkgs.lib;
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ in
|
|||
mkdir -m 0755 -p /var/lib/kdm
|
||||
chown kdm /var/lib/kdm
|
||||
${(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;
|
||||
};
|
||||
|
|
|
@ -12,4 +12,4 @@ default-resolutions = 75,75,100,100
|
|||
cache-hi-mark = 2048
|
||||
cache-low-mark = 1433
|
||||
cache-balance = 70
|
||||
catalogue = /var/run/current-system/sw/share/X11-fonts/
|
||||
catalogue = /run/current-system/sw/share/X11-fonts/
|
||||
|
|
|
@ -74,12 +74,12 @@ in
|
|||
|
||||
# Make this configuration the current configuration.
|
||||
# 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.
|
||||
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.
|
||||
ln -sfn /var/run/current-system /nix/var/nix/gcroots/current-system
|
||||
ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ fi
|
|||
# Activate the new configuration.
|
||||
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)
|
||||
|
||||
if test "$oldVersion" -ne "$newVersion"; then
|
||||
|
|
|
@ -189,4 +189,4 @@ fi
|
|||
|
||||
# Start Upstart's init.
|
||||
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}
|
||||
|
|
|
@ -65,7 +65,7 @@ in
|
|||
|
||||
script = ''
|
||||
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
|
||||
|
||||
set +e # continue in case of errors
|
||||
|
|
Loading…
Reference in a new issue