Browse Source

WiP! nixosConfigurations

remotes/origin/nixosModules
Emery Hemingway 12 months ago
parent
commit
db10a5b110
  1. 7
      flake.nix
  2. 42
      nixos-configurations/default.nix

7
flake.nix

@ -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;

42
nixos-configurations/default.nix

@ -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…
Cancel
Save