2
0
Fork 0

WiP! nixosConfigurations

This commit is contained in:
Emery Hemingway 2020-12-15 14:22:08 +01:00
parent ec9f6f3b9b
commit db10a5b110
2 changed files with 49 additions and 0 deletions

View File

@ -135,6 +135,13 @@
# Modules for composing Genode and NixOS
import ./nixos-modules { inherit self; };
nixosConfigurations =
# Demo configurations
import ./nixos-configurations {
inherit nixpkgs;
genodepkgs = self;
};
checks =
# Checks for continous testing
let tests = import ./tests;

View File

@ -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" ] ] ]
'';
};
})
];
};
}