Browse Source

Add nixosModules to flake

dabus
Emery Hemingway 9 months ago
parent
commit
51a68d1e91
2 changed files with 24 additions and 0 deletions
  1. 4
    0
      flake.nix
  2. 20
    0
      nixos-modules/default.nix

+ 4
- 0
flake.nix View File

@@ -131,6 +131,10 @@
131 131
             packages = self.packages.${system};
132 132
           });
133 133
 
134
+      nixosModules =
135
+        # Modules for composing Genode and NixOS
136
+        import ./nixos-modules { flake = self; };
137
+
134 138
       checks =
135 139
         # Checks for continous testing
136 140
         let tests = import ./tests;

+ 20
- 0
nixos-modules/default.nix View File

@@ -0,0 +1,20 @@
1
+{ flake }:
2
+
3
+let
4
+  baseModules =
5
+    [ ./genode-core.nix ./genode-init.nix ./gui ./hardware.nix ./systemd.nix ];
6
+in {
7
+
8
+  x86_64 = {
9
+    imports = [ baseModules ];
10
+    nixpkgs = rec {
11
+      localSystem = "x86_64-linux";
12
+      crossSystem = "x86_64-genode";
13
+      system = localSystem + "-" + crossSystem;
14
+      pkgs = flake.legacyPackages.${system};
15
+    };
16
+  };
17
+
18
+  nova = import ./nova.nix;
19
+
20
+}

Loading…
Cancel
Save