diff --git a/flake.nix b/flake.nix
index 4390079..4bd23ce 100644
--- a/flake.nix
+++ b/flake.nix
@@ -61,21 +61,12 @@
inherit packages;
};
- nixosModule = ./nixos;
-
- checks = (import ./tests {
+ checks = import ./tests {
inherit system localSystem crossSystem;
apps = dhall-haskell.apps.${localSystem} // apps;
inherit self nixpkgs genode-depot;
inherit lib;
genodepkgs = thisSystem self.packages;
- }) // {
- nixos = import ./nixos/test.nix {
- system = localSystem;
- depot = genode-depot;
- genodepkgs = self;
- inherit nixpkgs;
- };
};
};
diff --git a/nixos/default.nix b/nixos/default.nix
deleted file mode 100644
index 82e6bb7..0000000
--- a/nixos/default.nix
+++ /dev/null
@@ -1,86 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-{ config, pkgs, lib, ... }:
-
-{
- options.genode = with lib;
- let
- genodeOpts = { ... }: {
- options = {
-
- name = mkOption {
- example = "webserver";
- type = types.str;
- description = "Name of the Genode subsystem.";
- };
-
- pkgs = mkOption {
- type = with types; attrsOf package;
- description = ''
- Attribute set of Genode packages.
- '';
- };
-
- config = mkOption {
- type = types.str;
- default = "";
- description = ''
- Configuration of the Genode subsystem.
- Must be rendering in the Genode XML format.
- '';
- };
-
- rom = mkOption {
- type = with types; attrs;
- example = literalExample {
- nic_drv = "${genode-depot.ipxe_nic_drv}/bin/ipxe_nic_drv";
- };
- };
- };
- };
-
- in mkOption {
- type = with lib.types; loaOf (submodule genodeOpts);
- default = { };
- example = {
- foobar = {
- config = "";
- rom = { };
- };
- };
- description = ''
- Configurations of Genode subsystems
- '';
- };
-
- config = {
-
- systemd.services = let
- toService = name: cfg: {
- description = "Genode subsystem";
- wantedBy = [ "multi-user.target" ];
-
- preStart = let
- rom' = with cfg.pkgs.genode;
- {
- core = "${base-linux}/bin/core-linux";
- init = "${os}/bin/init";
- "ld.lib.so" = "${base-linux}/bin/ld.lib.so";
- timer = "${base-linux}/bin/linux_timer_drv";
- config = builtins.toFile "${name}.config.xml" cfg.config;
- } // cfg.rom;
- in builtins.concatStringsSep "\n"
- (lib.mapAttrsToList (name: value: "ln -s ${value} ${name}") rom');
-
- serviceConfig = {
- DynamicUser = true;
- RuntimeDirectory = "genode/" + name;
- WorkingDirectory = "/run/genode/" + name;
- ExecStart = "${cfg.pkgs.genode.base-linux}/bin/core-linux";
- };
- };
- in lib.mapAttrs toService config.genode;
-
- };
-
-}
diff --git a/nixos/test.nix b/nixos/test.nix
deleted file mode 100644
index 3f398e8..0000000
--- a/nixos/test.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-{ system, depot, genodepkgs, nixpkgs, }:
-
-import "${nixpkgs}/nixos/tests/make-test.nix" (
-
- { ... }:
-
- rec {
- name = "genode-base-linux";
-
- machine =
-
- { config, pkgs, lib, ... }:
- let
- flakePackages = flake:
- with builtins;
- getAttr config.nixpkgs.system (getAttr "packages" flake);
- in {
- imports = [ "${genodepkgs}/nixos" ];
- genode = {
- signal-test = rec {
- config = ''
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '';
- pkgs = flakePackages genodepkgs;
- rom = {
- "test-signal" =
- "${pkgs.genode.os}/bin/test-signal";
- };
- };
- };
- };
-
- testScript = ''
- $machine->waitUntilSucceeds("journalctl -u signal-test | grep -q -i -- '--- Signalling test finished ---'");
- '';
-
- }) { inherit system; }