Merge pull request #51918 from bobvanderlinden/var-run

tree-wide: nixos: /var/run -> /run
This commit is contained in:
Florian Klink 2019-04-07 20:09:46 +02:00 committed by GitHub
commit 2457510db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 74 additions and 79 deletions

View File

@ -226,9 +226,7 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/bash" [ "/run/current-system/sw/bin/bash"
"/var/run/current-system/sw/bin/bash"
"/run/current-system/sw/bin/sh" "/run/current-system/sw/bin/sh"
"/var/run/current-system/sw/bin/sh"
"${pkgs.bashInteractive}/bin/bash" "${pkgs.bashInteractive}/bin/bash"
"${pkgs.bashInteractive}/bin/sh" "${pkgs.bashInteractive}/bin/sh"
]; ];

View File

@ -232,7 +232,6 @@ in
environment.shells = [ environment.shells = [
"/run/current-system/sw/bin/fish" "/run/current-system/sw/bin/fish"
"/var/run/current-system/sw/bin/fish"
"${pkgs.fish}/bin/fish" "${pkgs.fish}/bin/fish"
]; ];

View File

@ -50,7 +50,6 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/xonsh" [ "/run/current-system/sw/bin/xonsh"
"/var/run/current-system/sw/bin/xonsh"
"${pkgs.xonsh}/bin/xonsh" "${pkgs.xonsh}/bin/xonsh"
]; ];

View File

@ -230,7 +230,6 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/zsh" [ "/run/current-system/sw/bin/zsh"
"/var/run/current-system/sw/bin/zsh"
"${pkgs.zsh}/bin/zsh" "${pkgs.zsh}/bin/zsh"
]; ];

View File

@ -134,7 +134,7 @@ with lib;
inetPort = [ "services" "postgrey" "inetPort" ]; inetPort = [ "services" "postgrey" "inetPort" ];
in in
if value inetAddr == null if value inetAddr == null
then { path = "/var/run/postgrey.sock"; } then { path = "/run/postgrey.sock"; }
else { addr = value inetAddr; port = value inetPort; } else { addr = value inetAddr; port = value inetPort; }
)) ))

View File

@ -15,7 +15,7 @@ let
Name = "${fd_cfg.name}"; Name = "${fd_cfg.name}";
FDPort = ${toString fd_cfg.port}; FDPort = ${toString fd_cfg.port};
WorkingDirectory = "${libDir}"; WorkingDirectory = "${libDir}";
Pid Directory = "/var/run"; Pid Directory = "/run";
${fd_cfg.extraClientConfig} ${fd_cfg.extraClientConfig}
} }
@ -41,7 +41,7 @@ let
Name = "${sd_cfg.name}"; Name = "${sd_cfg.name}";
SDPort = ${toString sd_cfg.port}; SDPort = ${toString sd_cfg.port};
WorkingDirectory = "${libDir}"; WorkingDirectory = "${libDir}";
Pid Directory = "/var/run"; Pid Directory = "/run";
${sd_cfg.extraStorageConfig} ${sd_cfg.extraStorageConfig}
} }
@ -77,7 +77,7 @@ let
Password = "${dir_cfg.password}"; Password = "${dir_cfg.password}";
DirPort = ${toString dir_cfg.port}; DirPort = ${toString dir_cfg.port};
Working Directory = "${libDir}"; Working Directory = "${libDir}";
Pid Directory = "/var/run/"; Pid Directory = "/run/";
QueryFile = "${pkgs.bacula}/etc/query.sql"; QueryFile = "${pkgs.bacula}/etc/query.sql";
${dir_cfg.extraDirectorConfig} ${dir_cfg.extraDirectorConfig}
} }

View File

@ -85,7 +85,7 @@ in {
uriFile = mkOption { uriFile = mkOption {
type = types.path; type = types.path;
default = "/var/run/couchdb/couchdb.uri"; default = "/run/couchdb/couchdb.uri";
description = '' description = ''
This file contains the full URI that can be used to access this This file contains the full URI that can be used to access this
instance of CouchDB. It is used to help discover the port CouchDB is instance of CouchDB. It is used to help discover the port CouchDB is

View File

@ -65,7 +65,7 @@ in
}; };
pidFile = mkOption { pidFile = mkOption {
default = "/var/run/mongodb.pid"; default = "/run/mongodb.pid";
description = "Location of MongoDB pid file"; description = "Location of MongoDB pid file";
}; };

View File

@ -226,8 +226,8 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
preStart = '' preStart = ''
mkdir -p /var/run/slapd mkdir -p /run/slapd
chown -R "${cfg.user}:${cfg.group}" /var/run/slapd chown -R "${cfg.user}:${cfg.group}" /run/slapd
${optionalString (cfg.declarativeContents != null) '' ${optionalString (cfg.declarativeContents != null) ''
rm -Rf "${cfg.dataDir}" rm -Rf "${cfg.dataDir}"
''} ''}

View File

@ -95,7 +95,7 @@ in
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
description = "The path to the socket to bind to."; description = "The path to the socket to bind to.";
example = "/var/run/redis.sock"; example = "/run/redis.sock";
}; };
logLevel = mkOption { logLevel = mkOption {

View File

@ -41,7 +41,7 @@ in
}; };
pidpath = mkOption { pidpath = mkOption {
default = "/var/run/rethinkdb"; default = "/run/rethinkdb";
description = "Location where each instance's pid file is located."; description = "Location where each instance's pid file is located.";
}; };

View File

@ -48,8 +48,8 @@ with lib;
requiredBy = [ "postfix.service" ]; requiredBy = [ "postfix.service" ];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
PIDFile = "/var/run/pfix-srsd.pid"; PIDFile = "/run/pfix-srsd.pid";
ExecStart = "${pkgs.pfixtools}/bin/pfix-srsd -p /var/run/pfix-srsd.pid -I ${config.services.pfix-srsd.domain} ${config.services.pfix-srsd.secretsFile}"; ExecStart = "${pkgs.pfixtools}/bin/pfix-srsd -p /run/pfix-srsd.pid -I ${config.services.pfix-srsd.domain} ${config.services.pfix-srsd.secretsFile}";
}; };
}; };
}; };

View File

@ -29,7 +29,7 @@ with lib; let
options = { options = {
path = mkOption { path = mkOption {
type = path; type = path;
default = "/var/run/postgrey.sock"; default = "/run/postgrey.sock";
description = "Path of the unix socket"; description = "Path of the unix socket";
}; };
@ -53,7 +53,7 @@ in {
socket = mkOption { socket = mkOption {
type = socket; type = socket;
default = { default = {
path = "/var/run/postgrey.sock"; path = "/run/postgrey.sock";
mode = "0777"; mode = "0777";
}; };
example = { example = {

View File

@ -174,7 +174,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --siteconfigpath=${spamdEnv} --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid"; ExecStart = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --siteconfigpath=${spamdEnv} --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/run/spamd.pid";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
}; };

View File

@ -30,7 +30,7 @@ ${optionalString (cfg.bind_host != null) ''
bind_host: "${cfg.bind_host}" bind_host: "${cfg.bind_host}"
''} ''}
server_name: "${cfg.server_name}" server_name: "${cfg.server_name}"
pid_file: "/var/run/matrix-synapse.pid" pid_file: "/run/matrix-synapse.pid"
web_client: ${boolToString cfg.web_client} web_client: ${boolToString cfg.web_client}
${optionalString (cfg.public_baseurl != null) '' ${optionalString (cfg.public_baseurl != null) ''
public_baseurl: "${cfg.public_baseurl}" public_baseurl: "${cfg.public_baseurl}"

View File

@ -101,7 +101,7 @@ in {
Type = "simple"; Type = "simple";
ExecStart = "${cfg.package}/bin/mbpfan -f${verbose}"; ExecStart = "${cfg.package}/bin/mbpfan -f${verbose}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
PIDFile = "/var/run/mbpfan.pid"; PIDFile = "/run/mbpfan.pid";
Restart = "always"; Restart = "always";
}; };
}; };

View File

@ -19,7 +19,7 @@ in
description = "spice-vdagent daemon"; description = "spice-vdagent daemon";
wantedBy = [ "graphical.target" ]; wantedBy = [ "graphical.target" ];
preStart = '' preStart = ''
mkdir -p "/var/run/spice-vdagentd/" mkdir -p "/run/spice-vdagentd/"
''; '';
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";

View File

@ -38,7 +38,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
preStart = "mkdir -p ${cfg.svnBaseDir}"; preStart = "mkdir -p ${cfg.svnBaseDir}";
script = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid"; script = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/run/svnserve.pid";
}; };
}; };
} }

View File

@ -24,7 +24,7 @@ let
status_file=${nagiosState}/status.dat status_file=${nagiosState}/status.dat
object_cache_file=${nagiosState}/objects.cache object_cache_file=${nagiosState}/objects.cache
temp_file=${nagiosState}/nagios.tmp temp_file=${nagiosState}/nagios.tmp
lock_file=/var/run/nagios.lock # Not used I think. lock_file=/run/nagios.lock # Not used I think.
state_retention_file=${nagiosState}/retention.dat state_retention_file=${nagiosState}/retention.dat
query_socket=${nagiosState}/nagios.qh query_socket=${nagiosState}/nagios.qh
check_result_path=${nagiosState} check_result_path=${nagiosState}

View File

@ -9,7 +9,7 @@ let
zabbix = cfg.package; zabbix = cfg.package;
stateDir = "/var/run/zabbix"; stateDir = "/run/zabbix";
logDir = "/var/log/zabbix"; logDir = "/var/log/zabbix";

View File

@ -7,7 +7,7 @@ let
cfg = config.services.zabbixServer; cfg = config.services.zabbixServer;
stateDir = "/var/run/zabbix"; stateDir = "/run/zabbix";
logDir = "/var/log/zabbix"; logDir = "/var/log/zabbix";

View File

@ -45,7 +45,7 @@ let
astdatadir => /var/lib/asterisk astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk astrundir => /run/asterisk
astlogdir => /var/log/asterisk astlogdir => /var/log/asterisk
astsbindir => ${cfg.package}/sbin astsbindir => ${cfg.package}/sbin
''; '';
@ -257,7 +257,7 @@ in
ExecReload = ''${cfg.package}/bin/asterisk -x "core reload" ExecReload = ''${cfg.package}/bin/asterisk -x "core reload"
''; '';
Type = "forking"; Type = "forking";
PIDFile = "/var/run/asterisk/asterisk.pid"; PIDFile = "/run/asterisk/asterisk.pid";
}; };
}; };
}; };

View File

@ -214,7 +214,7 @@ in
systemd.sockets.avahi-daemon = systemd.sockets.avahi-daemon =
{ description = "Avahi mDNS/DNS-SD Stack Activation Socket"; { description = "Avahi mDNS/DNS-SD Stack Activation Socket";
listenStreams = [ "/var/run/avahi-daemon/socket" ]; listenStreams = [ "/run/avahi-daemon/socket" ];
wantedBy = [ "sockets.target" ]; wantedBy = [ "sockets.target" ];
}; };
@ -229,7 +229,7 @@ in
path = [ pkgs.coreutils pkgs.avahi ]; path = [ pkgs.coreutils pkgs.avahi ];
preStart = "mkdir -p /var/run/avahi-daemon"; preStart = "mkdir -p /run/avahi-daemon";
script = script =
'' ''

View File

@ -25,8 +25,8 @@ let
blackhole { badnetworks; }; blackhole { badnetworks; };
forward first; forward first;
forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} }; forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
directory "/var/run/named"; directory "/run/named";
pid-file "/var/run/named/named.pid"; pid-file "/run/named/named.pid";
${cfg.extraOptions} ${cfg.extraOptions}
}; };
@ -187,8 +187,8 @@ in
${pkgs.bind.out}/sbin/rndc-confgen -r /dev/urandom -c /etc/bind/rndc.key -u ${bindUser} -a -A hmac-sha256 2>/dev/null ${pkgs.bind.out}/sbin/rndc-confgen -r /dev/urandom -c /etc/bind/rndc.key -u ${bindUser} -a -A hmac-sha256 2>/dev/null
fi fi
${pkgs.coreutils}/bin/mkdir -p /var/run/named ${pkgs.coreutils}/bin/mkdir -p /run/named
chown ${bindUser} /var/run/named chown ${bindUser} /run/named
''; '';
serviceConfig = { serviceConfig = {

View File

@ -25,7 +25,7 @@ let
logger_stdout=-1 logger_stdout=-1
logger_stdout_level=2 logger_stdout_level=2
ctrl_interface=/var/run/hostapd ctrl_interface=/run/hostapd
ctrl_interface_group=${cfg.group} ctrl_interface_group=${cfg.group}
${if cfg.wpa then '' ${if cfg.wpa then ''

View File

@ -62,7 +62,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
PIDFile = "/var/run/htpdate.pid"; PIDFile = "/run/htpdate.pid";
ExecStart = concatStringsSep " " [ ExecStart = concatStringsSep " " [
"${htpdate}/bin/htpdate" "${htpdate}/bin/htpdate"
"-D -u nobody" "-D -u nobody"

View File

@ -987,7 +987,7 @@ general {
* egdpool_path: path to EGD pool. Not necessary for OpenSSL >= 0.9.7 * egdpool_path: path to EGD pool. Not necessary for OpenSSL >= 0.9.7
* which automatically finds the path. * which automatically finds the path.
*/ */
# egdpool_path = "/var/run/egd-pool"; # egdpool_path = "/run/egd-pool";
/* /*

View File

@ -23,7 +23,7 @@ in
users.users._lldpd = { users.users._lldpd = {
description = "lldpd user"; description = "lldpd user";
group = "_lldpd"; group = "_lldpd";
home = "/var/run/lldpd"; home = "/run/lldpd";
isSystemUser = true; isSystemUser = true;
}; };
users.groups._lldpd = {}; users.groups._lldpd = {};

View File

@ -71,7 +71,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.miniupnpd}/bin/miniupnpd -f ${configFile}"; ExecStart = "${pkgs.miniupnpd}/bin/miniupnpd -f ${configFile}";
PIDFile = "/var/run/miniupnpd.pid"; PIDFile = "/run/miniupnpd.pid";
Type = "forking"; Type = "forking";
}; };
}; };

View File

@ -31,7 +31,7 @@ in
udp-port = 443 udp-port = 443
run-as-user = nobody run-as-user = nobody
run-as-group = nogroup run-as-group = nogroup
socket-file = /var/run/ocserv-socket socket-file = /run/ocserv-socket
server-cert = certs/server-cert.pem server-cert = certs/server-cert.pem
server-key = certs/server-key.pem server-key = certs/server-key.pem
keepalive = 32400 keepalive = 32400
@ -50,7 +50,7 @@ in
rekey-time = 172800 rekey-time = 172800
rekey-method = ssl rekey-method = ssl
use-occtl = true use-occtl = true
pid-file = /var/run/ocserv.pid pid-file = /run/ocserv.pid
device = vpns device = vpns
predictable-ips = true predictable-ips = true
default-domain = example.com default-domain = example.com
@ -90,8 +90,8 @@ in
serviceConfig = { serviceConfig = {
PrivateTmp = true; PrivateTmp = true;
PIDFile = "/var/run/ocserv.pid"; PIDFile = "/run/ocserv.pid";
ExecStart = "${pkgs.ocserv}/bin/ocserv --foreground --pid-file /var/run/ocesrv.pid --config /etc/ocserv/ocserv.conf"; ExecStart = "${pkgs.ocserv}/bin/ocserv --foreground --pid-file /run/ocesrv.pid --config /etc/ocserv/ocserv.conf";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
}; };
}; };

View File

@ -32,12 +32,12 @@ in {
else cfg.configPath else cfg.configPath
}"; }";
ExecReload = "${pkgs.ipsecTools}/bin/racoonctl reload-config"; ExecReload = "${pkgs.ipsecTools}/bin/racoonctl reload-config";
PIDFile = "/var/run/racoon.pid"; PIDFile = "/run/racoon.pid";
Type = "forking"; Type = "forking";
Restart = "always"; Restart = "always";
}; };
preStart = '' preStart = ''
rm /var/run/racoon.pid || true rm /run/racoon.pid || true
mkdir -p /var/racoon mkdir -p /var/racoon
''; '';
}; };

View File

@ -132,7 +132,7 @@ in
extraCmdArgs = mkOption { extraCmdArgs = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
example = "-e/var/run/wpa_supplicant/entropy.bin"; example = "-e/run/wpa_supplicant/entropy.bin";
description = description =
"Command line arguments to add when executing <literal>wpa_supplicant</literal>."; "Command line arguments to add when executing <literal>wpa_supplicant</literal>.";
}; };
@ -164,7 +164,7 @@ in
socketDir = mkOption { socketDir = mkOption {
type = types.str; type = types.str;
default = "/var/run/wpa_supplicant"; default = "/run/wpa_supplicant";
description = "Directory of sockets for controlling wpa_supplicant."; description = "Directory of sockets for controlling wpa_supplicant.";
}; };

View File

@ -6,7 +6,7 @@ let
cfg = config.networking.wireless; cfg = config.networking.wireless;
configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" '' configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" ''
${optionalString cfg.userControlled.enable '' ${optionalString cfg.userControlled.enable ''
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=${cfg.userControlled.group} ctrl_interface=DIR=/run/wpa_supplicant GROUP=${cfg.userControlled.group}
update_config=1''} update_config=1''}
${cfg.extraConfig} ${cfg.extraConfig}
${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let ${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let

View File

@ -17,7 +17,7 @@ let
chmod +x $out/startwm.sh chmod +x $out/startwm.sh
substituteInPlace $out/xrdp.ini \ substituteInPlace $out/xrdp.ini \
--replace "#rsakeys_ini=" "rsakeys_ini=/var/run/xrdp/rsakeys.ini" \ --replace "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \
--replace "certificate=" "certificate=${cfg.sslCert}" \ --replace "certificate=" "certificate=${cfg.sslCert}" \
--replace "key_file=" "key_file=${cfg.sslKey}" \ --replace "key_file=" "key_file=${cfg.sslKey}" \
--replace LogFile=xrdp.log LogFile=/dev/null \ --replace LogFile=xrdp.log LogFile=/dev/null \
@ -132,9 +132,9 @@ in
chown root:xrdp ${cfg.sslKey} ${cfg.sslCert} chown root:xrdp ${cfg.sslKey} ${cfg.sslCert}
chmod 440 ${cfg.sslKey} ${cfg.sslCert} chmod 440 ${cfg.sslKey} ${cfg.sslCert}
fi fi
if [ ! -s /var/run/xrdp/rsakeys.ini ]; then if [ ! -s /run/xrdp/rsakeys.ini ]; then
mkdir -p /var/run/xrdp mkdir -p /run/xrdp
${cfg.package}/bin/xrdp-keygen xrdp /var/run/xrdp/rsakeys.ini ${cfg.package}/bin/xrdp-keygen xrdp /run/xrdp/rsakeys.ini
fi fi
''; '';
serviceConfig = { serviceConfig = {

View File

@ -74,7 +74,7 @@ let
${concatMapStrings (addr: '' ${concatMapStrings (addr: ''
Listen ${addr} Listen ${addr}
'') cfg.listenAddresses} '') cfg.listenAddresses}
Listen /var/run/cups/cups.sock Listen /run/cups/cups.sock
SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin

View File

@ -100,8 +100,8 @@ in
in in
pkgs.writeText "fcron.conf" '' pkgs.writeText "fcron.conf" ''
fcrontabs = /var/spool/fcron fcrontabs = /var/spool/fcron
pidfile = /var/run/fcron.pid pidfile = /run/fcron.pid
fifofile = /var/run/fcron.fifo fifofile = /run/fcron.fifo
fcronallow = /etc/fcron.allow fcronallow = /etc/fcron.allow
fcrondeny = /etc/fcron.deny fcrondeny = /etc/fcron.deny
shell = /bin/sh shell = /bin/sh

View File

@ -45,7 +45,7 @@ in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ]; requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
preStart = '' preStart = ''
/run/current-system/sw/bin/rm -fv /var/run/hologram.sock /run/current-system/sw/bin/rm -fv /run/hologram.sock
''; '';
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}"; ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";

View File

@ -67,7 +67,7 @@ in
path = mkOption { path = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "/var/run/codimd.sock"; example = "/run/codimd.sock";
description = '' description = ''
Specify where a UNIX domain socket should be placed. Specify where a UNIX domain socket should be placed.
''; '';

View File

@ -13,7 +13,7 @@ let
runDir = "/run/restya-board"; runDir = "/run/restya-board";
poolName = "restya-board"; poolName = "restya-board";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
in in

View File

@ -4,7 +4,7 @@ let
cfg = config.services.selfoss; cfg = config.services.selfoss;
poolName = "selfoss_pool"; poolName = "selfoss_pool";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
dataDir = "/var/lib/selfoss"; dataDir = "/var/lib/selfoss";

View File

@ -15,7 +15,7 @@ let
else cfg.database.port; else cfg.database.port;
poolName = "tt-rss"; poolName = "tt-rss";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
tt-rss-config = pkgs.writeText "config.php" '' tt-rss-config = pkgs.writeText "config.php" ''
<?php <?php

View File

@ -22,7 +22,7 @@ in {
User: root User: root
# If available, "nobody" is much more secure for Group:. # If available, "nobody" is much more secure for Group:.
Group: root Group: root
Pid_File: /var/run/mighty.pid Pid_File: /run/mighty.pid
Logging: Yes # Yes or No Logging: Yes # Yes or No
Log_File: /var/log/mighty # The directory must be writable by User: Log_File: /var/log/mighty # The directory must be writable by User:
Log_File_Size: 16777216 # bytes Log_File_Size: 16777216 # bytes

View File

@ -20,7 +20,7 @@ in
services.xserver.desktopManager.session = [{ services.xserver.desktopManager.session = [{
name = "kodi"; name = "kodi";
start = '' start = ''
${pkgs.kodi}/bin/kodi --lircdev /var/run/lirc/lircd --standalone & ${pkgs.kodi}/bin/kodi --lircdev /run/lirc/lircd --standalone &
waitPID=$! waitPID=$!
''; '';
}]; }];

View File

@ -221,7 +221,7 @@ in
services.xserver.displayManager.job.execCmd = '' services.xserver.displayManager.job.execCmd = ''
${optionalString (cfg.pulseaudio) ${optionalString (cfg.pulseaudio)
"export PULSE_COOKIE=/var/run/pulse/.config/pulse/cookie"} "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"}
exec ${pkgs.xpra}/bin/xpra start \ exec ${pkgs.xpra}/bin/xpra start \
--daemon=off \ --daemon=off \
--log-dir=/var/log \ --log-dir=/var/log \
@ -233,7 +233,7 @@ in
--mdns=no \ --mdns=no \
--pulseaudio=no \ --pulseaudio=no \
${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \ ${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \
--socket-dirs=/var/run/xpra \ --socket-dirs=/run/xpra \
--xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \ --xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \
${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \ ${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \
--auth=${cfg.auth} \ --auth=${cfg.auth} \

View File

@ -31,7 +31,7 @@ in
listenOptions = listenOptions =
mkOption { mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["/var/run/docker.sock"]; default = ["/run/docker.sock"];
description = description =
'' ''
A list of unix and tcp docker should listen to. The format follows A list of unix and tcp docker should listen to. The format follows

View File

@ -49,7 +49,7 @@ in {
config = mkIf cfg.enable (let config = mkIf cfg.enable (let
# Where the communication sockets live # Where the communication sockets live
runDir = "/var/run/openvswitch"; runDir = "/run/openvswitch";
# The path to the an initialized version of the database # The path to the an initialized version of the database
db = pkgs.stdenv.mkDerivation { db = pkgs.stdenv.mkDerivation {
@ -99,13 +99,13 @@ in {
--certificate=db:Open_vSwitch,SSL,certificate \ --certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--unixctl=ovsdb.ctl.sock \ --unixctl=ovsdb.ctl.sock \
--pidfile=/var/run/openvswitch/ovsdb.pid \ --pidfile=/run/openvswitch/ovsdb.pid \
--detach \ --detach \
/var/db/openvswitch/conf.db /var/db/openvswitch/conf.db
''; '';
Restart = "always"; Restart = "always";
RestartSec = 3; RestartSec = 3;
PIDFile = "/var/run/openvswitch/ovsdb.pid"; PIDFile = "/run/openvswitch/ovsdb.pid";
# Use service type 'forking' to correctly determine when ovsdb-server is ready. # Use service type 'forking' to correctly determine when ovsdb-server is ready.
Type = "forking"; Type = "forking";
}; };
@ -123,10 +123,10 @@ in {
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${cfg.package}/bin/ovs-vswitchd \ ${cfg.package}/bin/ovs-vswitchd \
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid \ --pidfile=/run/openvswitch/ovs-vswitchd.pid \
--detach --detach
''; '';
PIDFile = "/var/run/openvswitch/ovs-vswitchd.pid"; PIDFile = "/run/openvswitch/ovs-vswitchd.pid";
# Use service type 'forking' to correctly determine when vswitchd is ready. # Use service type 'forking' to correctly determine when vswitchd is ready.
Type = "forking"; Type = "forking";
}; };
@ -152,11 +152,11 @@ in {
ExecStart = '' ExecStart = ''
${cfg.package}/bin/ovs-monitor-ipsec \ ${cfg.package}/bin/ovs-monitor-ipsec \
--root-prefix ${runDir}/ipsec \ --root-prefix ${runDir}/ipsec \
--pidfile /var/run/openvswitch/ovs-monitor-ipsec.pid \ --pidfile /run/openvswitch/ovs-monitor-ipsec.pid \
--monitor --detach \ --monitor --detach \
unix:/var/run/openvswitch/db.sock unix:/run/openvswitch/db.sock
''; '';
PIDFile = "/var/run/openvswitch/ovs-monitor-ipsec.pid"; PIDFile = "/run/openvswitch/ovs-monitor-ipsec.pid";
# Use service type 'forking' to correctly determine when ovs-monitor-ipsec is ready. # Use service type 'forking' to correctly determine when ovs-monitor-ipsec is ready.
Type = "forking"; Type = "forking";
}; };
@ -167,7 +167,7 @@ in {
ln -fs ${pkgs.ipsecTools}/bin/setkey ${runDir}/ipsec/usr/sbin/setkey ln -fs ${pkgs.ipsecTools}/bin/setkey ${runDir}/ipsec/usr/sbin/setkey
ln -fs ${pkgs.writeScript "racoon-restart" '' ln -fs ${pkgs.writeScript "racoon-restart" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
/var/run/current-system/sw/bin/systemctl $1 racoon /run/current-system/sw/bin/systemctl $1 racoon
''} ${runDir}/ipsec/etc/init.d/racoon ''} ${runDir}/ipsec/etc/init.d/racoon
''; '';
}; };

View File

@ -1,5 +1,5 @@
let let
nginxRoot = "/var/run/nginx"; nginxRoot = "/run/nginx";
in in
import ./make-test.nix ({...}: { import ./make-test.nix ({...}: {
name = "nghttpx"; name = "nghttpx";

View File

@ -11,7 +11,7 @@ with lib;
machine = { machine = {
services.osquery.enable = true; services.osquery.enable = true;
services.osquery.loggerPath = "/var/log/osquery/logs"; services.osquery.loggerPath = "/var/log/osquery/logs";
services.osquery.pidfile = "/var/run/osqueryd.pid"; services.osquery.pidfile = "/run/osqueryd.pid";
}; };
testScript = '' testScript = ''
@ -23,6 +23,6 @@ with lib;
"echo 'SELECT value FROM osquery_flags WHERE name = \"logger_path\";' | osqueryi | grep /var/log/osquery/logs" "echo 'SELECT value FROM osquery_flags WHERE name = \"logger_path\";' | osqueryi | grep /var/log/osquery/logs"
); );
$machine->succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"pidfile\";' | osqueryi | grep /var/run/osqueryd.pid"); $machine->succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"pidfile\";' | osqueryi | grep /run/osqueryd.pid");
''; '';
}) })

View File

@ -42,7 +42,7 @@ import ./make-test.nix ({pkgs, ... }: {
# check local encrypted connections work without error # check local encrypted connections work without error
$client->succeed("lpstat -E -r") =~ /scheduler is running/ or die; $client->succeed("lpstat -E -r") =~ /scheduler is running/ or die;
# Test that UNIX socket is used for connections. # Test that UNIX socket is used for connections.
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die; $client->succeed("lpstat -H") =~ "/run/cups/cups.sock" or die;
# Test that HTTP server is available too. # Test that HTTP server is available too.
$client->succeed("curl --fail http://localhost:631/"); $client->succeed("curl --fail http://localhost:631/");
$client->succeed("curl --fail http://server:631/"); $client->succeed("curl --fail http://server:631/");