Indentation cleanups

This commit is contained in:
Jonas Nick 2019-01-02 15:17:57 +00:00
parent 877e163ce5
commit bca40e23b1
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
9 changed files with 118 additions and 128 deletions

View File

@ -39,8 +39,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users.clightning = users.users.clightning = {
{
description = "clightning User"; description = "clightning User";
group = "clightning"; group = "clightning";
extraGroups = [ "bitcoinrpc" "keys" ]; extraGroups = [ "bitcoinrpc" "keys" ];
@ -50,8 +49,8 @@ in {
name = "clightning"; name = "clightning";
}; };
systemd.services.clightning = systemd.services.clightning = {
{ description = "Run clightningd"; description = "Run clightningd";
path = [ pkgs.bitcoin ]; path = [ pkgs.bitcoin ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "bitcoind.service" ]; requires = [ "bitcoind.service" ];
@ -68,8 +67,7 @@ in {
rm -f ${cfg.dataDir}/lightning-rpc rm -f ${cfg.dataDir}/lightning-rpc
echo "bitcoin-rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/config' echo "bitcoin-rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/config'
''; '';
serviceConfig = serviceConfig = {
{
PermissionsStartOnly = "true"; PermissionsStartOnly = "true";
ExecStart = "${pkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}"; ExecStart = "${pkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}";
User = "clightning"; User = "clightning";

View File

@ -23,13 +23,12 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.lightning-charge = systemd.services.lightning-charge = {
{ description = "Run lightning-charge"; description = "Run lightning-charge";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "clightning.service" ]; requires = [ "clightning.service" ];
after = [ "clightning.service" ]; after = [ "clightning.service" ];
serviceConfig = serviceConfig = {
{
EnvironmentFile = "/secrets/lightning-charge-api-token"; EnvironmentFile = "/secrets/lightning-charge-api-token";
ExecStart = "${pkgs.lightning-charge.package}/bin/charged -l ${config.services.clightning.dataDir} -d ${config.services.clightning.dataDir}/lightning-charge.db"; ExecStart = "${pkgs.lightning-charge.package}/bin/charged -l ${config.services.clightning.dataDir} -d ${config.services.clightning.dataDir}/lightning-charge.db";
# Unfortunately c-lightning doesn't allow setting the permissions of the rpc socket, # Unfortunately c-lightning doesn't allow setting the permissions of the rpc socket,

View File

@ -61,13 +61,12 @@ in {
name = "nanopos"; name = "nanopos";
}; };
systemd.services.nanopos = systemd.services.nanopos = {
{ description = "Run nanopos"; description = "Run nanopos";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "lightning-charge.service" ]; requires = [ "lightning-charge.service" ];
after = [ "lightning-charge.service" ]; after = [ "lightning-charge.service" ];
serviceConfig = serviceConfig = {
{
EnvironmentFile = "/secrets/lightning-charge-api-token-for-nanopos"; EnvironmentFile = "/secrets/lightning-charge-api-token-for-nanopos";
ExecStart = "${pkgs.nanopos.package}/bin/nanopos -y ${cfg.itemsFile} -p ${toString cfg.port} --show-bolt11"; ExecStart = "${pkgs.nanopos.package}/bin/nanopos -y ${cfg.itemsFile} -p ${toString cfg.port} --show-bolt11";

View File

@ -30,8 +30,7 @@ let
chown -R operator ${config.users.users.operator.home}/.ssh chown -R operator ${config.users.users.operator.home}/.ssh
''; '';
in { in {
imports = imports = [
[
./bitcoind.nix ./bitcoind.nix
./clightning.nix ./clightning.nix
./lightning-charge.nix ./lightning-charge.nix

View File

@ -23,13 +23,12 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.spark-wallet = systemd.services.spark-wallet = {
{ description = "Run spark-wallet"; description = "Run spark-wallet";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "clightning.service" ]; requires = [ "clightning.service" ];
after = [ "clightning.service" ]; after = [ "clightning.service" ];
serviceConfig = serviceConfig = {
{
ExecStart = "${pkgs.spark-wallet.package}/bin/spark-wallet --ln-path ${cfg.ln-path} -k -c /secrets/spark-wallet-password"; ExecStart = "${pkgs.spark-wallet.package}/bin/spark-wallet --ln-path ${cfg.ln-path} -k -c /secrets/spark-wallet-password";
User = "clightning"; User = "clightning";
Restart = "on-failure"; Restart = "on-failure";

View File

@ -15,8 +15,7 @@
liquidd = pkgs.callPackage (import pkgs/liquidd.nix) { }; liquidd = pkgs.callPackage (import pkgs/liquidd.nix) { };
in { in {
disabledModules = [ "services/security/tor.nix" ]; disabledModules = [ "services/security/tor.nix" ];
imports = imports = [
[
./modules/nix-bitcoin.nix ./modules/nix-bitcoin.nix
(unstable-pkgs-git + "/nixos/modules/services/security/tor.nix") (unstable-pkgs-git + "/nixos/modules/services/security/tor.nix")
]; ];

View File

@ -1,6 +1,5 @@
{pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}: {pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
with pkgs; with pkgs;
let let
d1 = stdenv.mkDerivation { d1 = stdenv.mkDerivation {

View File

@ -1,6 +1,5 @@
{pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}: {pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
with pkgs; with pkgs;
let let
d1 = stdenv.mkDerivation { d1 = stdenv.mkDerivation {

View File

@ -1,6 +1,5 @@
{pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}: {pkgs, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
with pkgs; with pkgs;
let let
d1 = stdenv.mkDerivation { d1 = stdenv.mkDerivation {