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:
parent
5dbd4b2b27
commit
41d45d674a
3 changed files with 27 additions and 9 deletions
|
@ -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/")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue