forked from dan/liminix
remove redundant sourcing of ${serviceFns}
this is done by the oneshot and longrun functions
This commit is contained in:
parent
283c3154a7
commit
7351e143c5
@ -52,7 +52,6 @@ in rec {
|
||||
dependencies = [ services.dhcpc ];
|
||||
name = "resolvconf";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
( in_outputs ${name}
|
||||
for i in $(output ${services.dhcpc} dns); do
|
||||
echo "nameserver $i" > resolv.conf
|
||||
@ -93,7 +92,6 @@ in rec {
|
||||
secrets_file = oneshot rec {
|
||||
name = "rsync-secrets";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
(in_outputs ${name}
|
||||
echo "backup:${secrets.rsync_secret}" > secrets)
|
||||
'';
|
||||
|
@ -137,7 +137,6 @@ in rec {
|
||||
dependencies = [ services.wan ];
|
||||
name = "resolvconf";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
( in_outputs ${name}
|
||||
echo "nameserver $(output ${services.wan} ns1)" > resolv.conf
|
||||
echo "nameserver $(output ${services.wan} ns2)" >> resolv.conf
|
||||
|
@ -60,7 +60,6 @@ in rec {
|
||||
dependencies = [ services.dhcpc ];
|
||||
name = "resolvconf";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
( in_outputs ${name}
|
||||
for i in $(output ${services.dhcpc} dns); do
|
||||
echo "nameserver $i" > resolv.conf
|
||||
@ -72,7 +71,6 @@ in rec {
|
||||
services.growfs = let name = "growfs"; in oneshot {
|
||||
inherit name;
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
device=$(grep /persist /proc/1/mountinfo | cut -f9 -d' ')
|
||||
${pkgs.e2fsprogs}/bin/resize2fs $device
|
||||
'';
|
||||
|
@ -26,7 +26,6 @@ longrun {
|
||||
inherit name;
|
||||
dependencies = [ interface ];
|
||||
run = ''
|
||||
. ${serviceFns}
|
||||
${dnsmasq}/bin/dnsmasq \
|
||||
--user=${user} \
|
||||
--domain=${domain} \
|
||||
|
@ -11,7 +11,6 @@ let
|
||||
# prefixes, or the same but different protocols
|
||||
name = "${interface.name}.a.${address}";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
dev=$(output ${interface} ifname)
|
||||
ip address add ${address}/${toString prefixLength} dev $dev
|
||||
(in_outputs ${name}
|
||||
|
@ -149,7 +149,6 @@ in {
|
||||
dependencies = [ config.services.wan ];
|
||||
name = "resolvconf";
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
( in_outputs ${name}
|
||||
echo "nameserver $(output ${config.services.wan} ns1)" > resolv.conf
|
||||
echo "nameserver $(output ${config.services.wan} ns2)" >> resolv.conf
|
||||
|
@ -81,7 +81,6 @@ in {
|
||||
# 'A list of DNS server' but doesn't say what separates the
|
||||
# list members. Assuming it's a space or other IFS character
|
||||
up = ''
|
||||
. ${serviceFns}
|
||||
( in_outputs ${name}
|
||||
for i in $(output ${config.services.dhcpc} dns); do
|
||||
echo "nameserver $i" > resolv.conf
|
||||
|
@ -9,7 +9,6 @@ in longrun {
|
||||
inherit name;
|
||||
buildInputs = [ json-to-fstree ];
|
||||
run = ''
|
||||
. ${serviceFns}
|
||||
${optionalString (username != null) ''
|
||||
export NETRC=$(mkstate ${name})/netrc
|
||||
(echo default ; echo login ${username} ; echo password ${password} ) > $NETRC
|
||||
|
Loading…
Reference in New Issue
Block a user