diff --git a/examples/qemu-vm/minimal-vm.nix b/examples/qemu-vm/minimal-vm.nix index 25a66c7..a639d0f 100644 --- a/examples/qemu-vm/minimal-vm.nix +++ b/examples/qemu-vm/minimal-vm.nix @@ -43,6 +43,7 @@ rec { - nodeinfo - systemctl status bitcoind - systemctl status clightning + - lightning-cli getinfo ''; # Power off VM when the user exits the shell diff --git a/examples/qemu-vm/vm-config.nix b/examples/qemu-vm/vm-config.nix index b3cd0d3..0091d8d 100644 --- a/examples/qemu-vm/vm-config.nix +++ b/examples/qemu-vm/vm-config.nix @@ -3,7 +3,7 @@ # Disable the hardened preset to improve VM performance disabledModules = [ ]; - imports = [ (modulesPath + "/virtualisation/qemu-vm.nix" ]; + imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; config = { virtualisation.graphics = false; diff --git a/modules/clightning.nix b/modules/clightning.nix index dba8d9a..370ec40 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -102,16 +102,18 @@ let nbLib = config.nix-bitcoin.lib; nbPkgs = config.nix-bitcoin.pkgs; - network = config.services.bitcoind.makeNetworkName "bitcoin" "regtest"; + inherit (config.services) bitcoind; + + network = bitcoind.makeNetworkName "bitcoin" "regtest"; configFile = pkgs.writeText "config" '' network=${network} - bitcoin-datadir=${config.services.bitcoind.dataDir} + bitcoin-datadir=${bitcoind.dataDir} ${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"} always-use-proxy=${boolToString cfg.always-use-proxy} bind-addr=${cfg.address}:${toString cfg.port} - bitcoin-rpcconnect=${nbLib.address config.services.bitcoind.rpc.address} - bitcoin-rpcport=${toString config.services.bitcoind.rpc.port} - bitcoin-rpcuser=${config.services.bitcoind.rpc.users.public.name} + bitcoin-rpcconnect=${nbLib.address bitcoind.rpc.address} + bitcoin-rpcport=${toString bitcoind.rpc.port} + bitcoin-rpcuser=${bitcoind.rpc.users.public.name} rpc-file-mode=0660 log-timestamps=false ${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"} diff --git a/test/clightning-replication.nix b/test/clightning-replication.nix index 70d8102..4ee08b5 100644 --- a/test/clightning-replication.nix +++ b/test/clightning-replication.nix @@ -128,8 +128,8 @@ makeTestVM { # A gocryptfs has been created client.succeed("ls /var/backup/clightning/lightningd-db/gocryptfs.conf") - server.wait_for_unit("sshd.service") switch_to_system("replicationRemote") + server.wait_for_unit("sshd.service") with subtest("remote replication"): replica_db = "/var/cache/clightning-replication/sshfs/lightningd.sqlite3" client.succeed(f"runuser -u clightning -- ls {replica_db}")