treewide: remove unneeded string literals

This commit is contained in:
Erik Arvstedt 2021-02-01 22:53:12 +01:00
parent e6a6c721c1
commit 4f6ff408ef
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
11 changed files with 27 additions and 27 deletions

View File

@ -72,7 +72,7 @@ in {
"--include-filelist" "${filelist}" "--include-filelist" "${filelist}"
"--full-if-older-than" "1M" "--full-if-older-than" "1M"
]; ];
targetUrl = "${cfg.destination}"; targetUrl = cfg.destination;
frequency = cfg.frequency; frequency = cfg.frequency;
secretFile = "${config.nix-bitcoin.secretsDir}/backup-encryption-env"; secretFile = "${config.nix-bitcoin.secretsDir}/backup-encryption-env";
}; };

View File

@ -343,13 +343,13 @@ in {
serviceConfig = nbLib.defaultHardening // { serviceConfig = nbLib.defaultHardening // {
Type = "notify"; Type = "notify";
NotifyAccess = "all"; NotifyAccess = "all";
User = "${cfg.user}"; User = cfg.user;
Group = "${cfg.group}"; Group = cfg.group;
TimeoutStartSec = 300; TimeoutStartSec = 300;
ExecStart = "${cfg.package}/bin/bitcoind -datadir='${cfg.dataDir}'"; ExecStart = "${cfg.package}/bin/bitcoind -datadir='${cfg.dataDir}'";
Restart = "on-failure"; Restart = "on-failure";
UMask = mkIf cfg.dataDirReadableByGroup "0027"; UMask = mkIf cfg.dataDirReadableByGroup "0027";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // (if cfg.enforceTor } // (if cfg.enforceTor
then nbLib.allowTor then nbLib.allowTor
else nbLib.allowAnyIP) else nbLib.allowAnyIP)
@ -375,9 +375,9 @@ in {
done done
''; '';
serviceConfig = nbLib.defaultHardening // { serviceConfig = nbLib.defaultHardening // {
User = "${cfg.user}"; User = cfg.user;
Group = "${cfg.group}"; Group = cfg.group;
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // nbLib.allowTor; } // nbLib.allowTor;
}; };

View File

@ -108,7 +108,7 @@ in {
enable = true; enable = true;
ensureDatabases = [ "btcpaydb" ]; ensureDatabases = [ "btcpaydb" ];
ensureUsers = [{ ensureUsers = [{
name = "${cfg.btcpayserver.user}"; name = cfg.btcpayserver.user;
ensurePermissions."DATABASE btcpaydb" = "ALL PRIVILEGES"; ensurePermissions."DATABASE btcpaydb" = "ALL PRIVILEGES";
}]; }];
}; };

View File

@ -140,10 +140,10 @@ in {
''; '';
serviceConfig = nbLib.defaultHardening // { serviceConfig = nbLib.defaultHardening // {
ExecStart = "${nbPkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}"; ExecStart = "${nbPkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}";
User = "${cfg.user}"; User = cfg.user;
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s"; RestartSec = "10s";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // (if cfg.enforceTor } // (if cfg.enforceTor
then nbLib.allowTor then nbLib.allowTor
else nbLib.allowAnyIP else nbLib.allowAnyIP

View File

@ -47,7 +47,7 @@ in {
# Provides lsusb for debugging # Provides lsusb for debugging
pkgs.usbutils pkgs.usbutils
]; ];
users.groups."${cfg.group}" = {}; users.groups.${cfg.group} = {};
nix-bitcoin.operator.groups = [ cfg.group ]; nix-bitcoin.operator.groups = [ cfg.group ];
}) })
(mkIf cfg.ledger { (mkIf cfg.ledger {

View File

@ -79,7 +79,7 @@ in {
serviceConfig = nbLib.defaultHardening // rec { serviceConfig = nbLib.defaultHardening // rec {
StateDirectory = "joinmarket-ob-watcher"; StateDirectory = "joinmarket-ob-watcher";
StateDirectoryMode = "0770"; StateDirectoryMode = "0770";
WorkingDirectory = "${cfg.dataDir}"; # The service creates dir 'logs' in the working dir WorkingDirectory = cfg.dataDir; # The service creates dir 'logs' in the working dir
ExecStart = '' ExecStart = ''
${nbPkgs.joinmarket}/bin/ob-watcher --datadir=${cfg.dataDir} \ ${nbPkgs.joinmarket}/bin/ob-watcher --datadir=${cfg.dataDir} \
--host=${cfg.address} --port=${toString cfg.port} --host=${cfg.address} --port=${toString cfg.port}

View File

@ -148,7 +148,7 @@ in {
]; ];
users.users.${cfg.user} = { users.users.${cfg.user} = {
description = "joinmarket User"; description = "joinmarket User";
group = "${cfg.group}"; group = cfg.group;
home = cfg.dataDir; home = cfg.dataDir;
extraGroups = [ "tor" ]; extraGroups = [ "tor" ];
}; };
@ -202,11 +202,11 @@ in {
fi fi
''); '');
ExecStart = "${nbPkgs.joinmarket}/bin/joinmarketd"; ExecStart = "${nbPkgs.joinmarket}/bin/joinmarketd";
WorkingDirectory = "${cfg.dataDir}"; # The service creates 'commitmentlist' in the working dir WorkingDirectory = cfg.dataDir; # The service creates 'commitmentlist' in the working dir
User = "${cfg.user}"; User = cfg.user;
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s"; RestartSec = "10s";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // nbLib.allowTor; } // nbLib.allowTor;
}; };
@ -242,10 +242,10 @@ in {
serviceConfig = nbLib.defaultHardening // rec { serviceConfig = nbLib.defaultHardening // rec {
RuntimeDirectory = "joinmarket-yieldgenerator"; # Only used to create start script RuntimeDirectory = "joinmarket-yieldgenerator"; # Only used to create start script
RuntimeDirectoryMode = "700"; RuntimeDirectoryMode = "700";
WorkingDirectory = "${cfg.dataDir}"; # The service creates dir 'logs' in the working dir WorkingDirectory = cfg.dataDir; # The service creates dir 'logs' in the working dir
ExecStart = "${pkgs.bash}/bin/bash /run/${RuntimeDirectory}/start"; ExecStart = "${pkgs.bash}/bin/bash /run/${RuntimeDirectory}/start";
User = "${cfg.user}"; User = cfg.user;
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // nbLib.allowTor; } // nbLib.allowTor;
}; };
}) })

View File

@ -101,7 +101,7 @@ in {
User = "lnd"; User = "lnd";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s"; RestartSec = "10s";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // (if cfg.enforceTor } // (if cfg.enforceTor
then nbLib.allowTor then nbLib.allowTor
else nbLib.allowAnyIP); else nbLib.allowAnyIP);

View File

@ -233,12 +233,12 @@ in {
''; '';
serviceConfig = nbLib.defaultHardening // { serviceConfig = nbLib.defaultHardening // {
Type = "simple"; Type = "simple";
User = "${cfg.user}"; User = cfg.user;
Group = "${cfg.group}"; Group = cfg.group;
ExecStart = "${nbPkgs.elementsd}/bin/elementsd ${cmdlineOptions}"; ExecStart = "${nbPkgs.elementsd}/bin/elementsd ${cmdlineOptions}";
PIDFile = "${pidFile}"; PIDFile = pidFile;
Restart = "on-failure"; Restart = "on-failure";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
} // (if cfg.enforceTor } // (if cfg.enforceTor
then nbLib.allowTor then nbLib.allowTor
else nbLib.allowAnyIP else nbLib.allowAnyIP

View File

@ -193,7 +193,7 @@ in {
User = "lnd"; User = "lnd";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s"; RestartSec = "10s";
ReadWritePaths = "${cfg.dataDir}"; ReadWritePaths = cfg.dataDir;
ExecStartPost = let ExecStartPost = let
restUrl = "https://${cfg.restAddress}:${toString cfg.restPort}/v1"; restUrl = "https://${cfg.restAddress}:${toString cfg.restPort}/v1";
in [ in [
@ -246,7 +246,7 @@ in {
sleep 0.1 sleep 0.1
done done
''}" '')
# Run fully privileged for chown # Run fully privileged for chown
"+${nbLib.script '' "+${nbLib.script ''
umask ug=r,o= umask ug=r,o=

View File

@ -6,7 +6,7 @@ buildPythonPackage rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "freelan-developers"; owner = "freelan-developers";
repo = "chromalog"; repo = "chromalog";
rev = "${version}"; rev = version;
sha256 = "0pj4s52rgwlvwkzrj85y92c5r9c84pz8gga45jl5spysrv41y9p0"; sha256 = "0pj4s52rgwlvwkzrj85y92c5r9c84pz8gga45jl5spysrv41y9p0";
}; };