WiP! nixosConfigurations
This commit is contained in:
parent
07a1e2e574
commit
a21f54ab00
|
@ -135,6 +135,13 @@
|
|||
# Modules for composing Genode and NixOS
|
||||
import ./nixos-modules { flake = self; };
|
||||
|
||||
nixosConfigurations =
|
||||
# Demo configurations
|
||||
import ./nixos-configurations {
|
||||
inherit nixpkgs;
|
||||
genodepkgs = self;
|
||||
};
|
||||
|
||||
checks =
|
||||
# Checks for continous testing
|
||||
let tests = import ./tests;
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
{ nixpkgs, genodepkgs }:
|
||||
|
||||
{
|
||||
torDemo = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-genode";
|
||||
modules = [
|
||||
genodepkgs.nixosModules.x86_64
|
||||
genodepkgs.nixosModules.nova
|
||||
|
||||
({ config, lib, pkgs, ... }: {
|
||||
genode.boot.storeBackend = "usb";
|
||||
genode.gui.consoleLog.enable = true;
|
||||
networking.interfaces.eth0.genode.driver = "ipxe";
|
||||
services.tor = {
|
||||
enable = true;
|
||||
client.enable = false;
|
||||
extraConfig = ''
|
||||
Log [general,net,config,fs]debug stdout
|
||||
''; # MaxMemInQueues 64 MBytes
|
||||
relay = {
|
||||
enable = true;
|
||||
contactInfo = "genodepkgs-junk@spam.works";
|
||||
port = 80;
|
||||
role = "relay";
|
||||
bridgeTransports = [ ];
|
||||
};
|
||||
};
|
||||
systemd.services.tor.genode = {
|
||||
enable = true;
|
||||
interface = "eth0";
|
||||
ramQuota = 1024;
|
||||
extraVfs = pkgs.writeText "tor.vfs.dhall" ''
|
||||
let VFS = (env:DHALL_GENODE).VFS
|
||||
|
||||
in [ VFS.dir "var" [ VFS.dir "lib" [ VFS.leaf "ram" ] ] ]
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue