2
0
Fork 0
genodepkgs/tests/tor.nix

34 lines
815 B
Nix
Raw Normal View History

2020-12-02 17:30:10 +01:00
{
name = "tor";
2020-12-03 12:53:10 +01:00
machine = { config, pkgs, ... }: {
2020-12-02 17:30:10 +01:00
imports = [ ../nixos-modules/hardware.nix ../nixos-modules/systemd.nix ];
services.tor = {
enable = true;
client.enable = false;
2020-12-03 12:53:10 +01:00
extraConfig = ''
Log [general,net,config,fs]debug stdout
MaxMemInQueues 64 MBytes
'';
2020-12-02 17:30:10 +01:00
relay = {
enable = true;
2020-12-03 12:53:10 +01:00
contactInfo = "genodepkgs-junk@spam.works";
2020-12-02 17:30:10 +01:00
port = 80;
role = "relay";
bridgeTransports = [ ];
};
};
systemd.services.tor.genode = {
enable = true;
interface = "eth1";
2020-12-03 12:53:10 +01:00
ramQuota = 96;
extraVfs = pkgs.writeText "tor.vfs.dhall" ''
let Genode = env:DHALL_GENODE
let VFS = Genode.VFS
in [ VFS.dir "var" [ VFS.dir "lib" [ VFS.leaf "ram" ] ] ]
'';
2020-12-02 17:30:10 +01:00
};
};
}