{ nixpkgs ? import {} }: let inherit (import nixpkgs) snakeOilPrivateKey snakeOilPublicKey snakeOilEd25519PrivateKey snakeOilEd25519PublicKey; in nixpkgs.nixosTest { name = "git-annex-specialremote-ramarkable2"; nodes.annex = { services.openssh = { enable = true; settings.PermitEmptyPasswords = true; settings.PermitRootLogin = "yes"; }; environment.systemPackages = with nixpkgs; [ openssh (callPackage ./default.nix {}) gitFull git-annex ]; users.users.root = { openssh.authorizedKeys.keys = [ snakeOilEd25519PublicKey ]; }; }; testScript = '' machine.start() machine.wait_for_open_port(22) machine.succeed("mkdir -p /root/.ssh") machine.succeed("echo ${snakeOilEd25519PublicKey} > /root/.ssh/id_ed25519.pub") machine.succeed("echo StrictHostKeyChecking no > /root/.ssh/config") machine.succeed("cp ${snakeOilEd25519PrivateKey} /root/.ssh/id_ed25519") machine.succeed("chmod 600 /root/.ssh/id_ed25519") machine.succeed("ssh localhost echo meow") machine.succeed("mkdir -p /root/.local/share/remarkable/xochitl") machine.succeed("mkdir -p repo && cd repo") machine.succeed("git init") machine.succeed("git annex init") machine.succeed("git annex initremote localhost type=external externaltype=remarkable2 ssh_destination=localhost encryption=none exporttree=yes") machine.succeed("git annex testremote -d --fast localhost") ''; }