fixup nixosConfigurations
This commit is contained in:
parent
57249d98e5
commit
221fcea79d
|
@ -132,6 +132,13 @@
|
||||||
# Modules for composing Genode and NixOS
|
# Modules for composing Genode and NixOS
|
||||||
import ./nixos-modules { flake = self; };
|
import ./nixos-modules { flake = self; };
|
||||||
|
|
||||||
|
nixosConfigurations =
|
||||||
|
# Demo NixOS configurations
|
||||||
|
import ./nixos-configurations {
|
||||||
|
inherit nixpkgs;
|
||||||
|
genodepkgs = self;
|
||||||
|
};
|
||||||
|
|
||||||
checks =
|
checks =
|
||||||
# Checks for continous testing
|
# Checks for continous testing
|
||||||
let tests = import ./tests;
|
let tests = import ./tests;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ nixpkgs, genodepkgs }:
|
||||||
|
|
||||||
|
{
|
||||||
|
torDemo = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-genode";
|
||||||
|
modules = [
|
||||||
|
genodepkgs.nixosModules.x86_64
|
||||||
|
genodepkgs.nixosModules.nova
|
||||||
|
(import ./tor-relay.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
networking.interfaces.eth0 = {
|
||||||
|
genode.driver = "virtio";
|
||||||
|
useDHCP = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.tor = {
|
||||||
|
enable = true;
|
||||||
|
client.enable = false;
|
||||||
|
extraConfig = ''
|
||||||
|
Log [general,net,config,fs]debug stdout
|
||||||
|
'';
|
||||||
|
relay = {
|
||||||
|
enable = true;
|
||||||
|
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" ] ] ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -6,7 +6,13 @@ let
|
||||||
in {
|
in {
|
||||||
|
|
||||||
x86_64 = {
|
x86_64 = {
|
||||||
imports = [ baseModules ];
|
imports = [
|
||||||
|
./genode-core.nix
|
||||||
|
./genode-init.nix
|
||||||
|
./hardware.nix
|
||||||
|
./qemu-vm.nix
|
||||||
|
./systemd.nix
|
||||||
|
];
|
||||||
nixpkgs = rec {
|
nixpkgs = rec {
|
||||||
localSystem = "x86_64-linux";
|
localSystem = "x86_64-linux";
|
||||||
crossSystem = "x86_64-genode";
|
crossSystem = "x86_64-genode";
|
||||||
|
|
Loading…
Reference in New Issue