0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/ipfs: add systemd hardening

Use the hardened systemd unit from upstream.
This commit is contained in:
Luflosi 2022-03-17 16:40:54 +01:00
parent 5dbd4b2b27
commit 41d45d674a
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0
3 changed files with 27 additions and 9 deletions

View file

@ -10,6 +10,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
# Also will add a unix domain socket socket API address, see module.
startWhenNeeded = true;
apiAddress = "/ip4/127.0.0.1/tcp/2324";
dataDir = "/mnt/ipfs";
};
};
@ -35,5 +36,9 @@ import ./make-test-python.nix ({ pkgs, ...} : {
machine.succeed(
f"ipfs --api /unix/run/ipfs.sock cat /ipfs/{ipfs_hash.strip()} | grep fnord2"
)
# Test if setting dataDir works properly with the hardened systemd unit
machine.succeed("test -e /mnt/ipfs/config")
machine.succeed("test ! -e /var/lib/ipfs/")
'';
})