2024-11-05 21:11:29 +01:00
|
|
|
{
|
|
|
|
description = "Hardened Linux kernel";
|
|
|
|
|
|
|
|
inputs = {
|
2024-11-17 14:57:59 +01:00
|
|
|
neoidiosyn.url = "git+https://woof.rip/mikael/neoidiosyn.git";
|
2024-11-05 21:11:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nixConfig = {
|
|
|
|
extra-experimental-features = [ "pipe-operator" "pipe-operators" ];
|
|
|
|
extra-substituters = [ "https://cache.kyouma.net" ];
|
|
|
|
extra-trusted-public-keys = [ "cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg=" ];
|
|
|
|
};
|
|
|
|
|
2024-11-17 14:57:59 +01:00
|
|
|
outputs = { self, neoidiosyn, ... }@inputs: let
|
|
|
|
inherit (neoidiosyn) lib;
|
2024-11-05 23:52:31 +01:00
|
|
|
packageWith = pkgs: args: pkgs.callPackage ./package.nix
|
|
|
|
(if builtins.isPath args then import args else args);
|
2024-11-05 21:11:29 +01:00
|
|
|
in {
|
|
|
|
lib.kernel = import ./lib.nix { inherit lib; };
|
|
|
|
packages = {
|
|
|
|
riscv64-linux = let
|
2024-11-17 14:57:59 +01:00
|
|
|
package = packageWith neoidiosyn.legacyPackages.riscv64-linux;
|
2024-11-05 21:11:29 +01:00
|
|
|
in {
|
|
|
|
default = package { };
|
2024-11-13 17:57:58 +01:00
|
|
|
paravirt = package ./platform/paravirt.nix;
|
2024-11-05 21:11:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
aarch64-linux = let
|
2024-11-17 14:57:59 +01:00
|
|
|
package = packageWith neoidiosyn.legacyPackages.aarch64-linux;
|
2024-11-05 21:11:29 +01:00
|
|
|
in {
|
|
|
|
default = package { };
|
2024-11-13 17:57:58 +01:00
|
|
|
paravirt = package ./platform/paravirt.nix;
|
2024-11-05 21:11:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
x86_64-linux = let
|
2024-11-17 14:57:59 +01:00
|
|
|
package = packageWith neoidiosyn.legacyPackages.x86_64-linux;
|
2024-11-05 21:11:29 +01:00
|
|
|
in {
|
|
|
|
default = package { };
|
2024-11-13 17:57:58 +01:00
|
|
|
paravirt = package ./platform/paravirt.nix;
|
2024-11-06 12:21:48 +01:00
|
|
|
supermicro-h11ssw = package ./platform/supermicro-h11ssw.nix;
|
2024-11-05 23:52:31 +01:00
|
|
|
thinkpad-x1-extreme-gen5 = package ./platform/thinkpad-x1-extreme-gen5.nix;
|
2024-11-05 21:11:29 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-07 22:55:49 +01:00
|
|
|
devShells = lib.genAttrs [ "riscv64-linux" "aarch64-linux" "x86_64-linux" ] (system: {
|
|
|
|
default = let
|
2024-11-17 14:57:59 +01:00
|
|
|
pkgs = neoidiosyn.legacyPackages.${system};
|
2024-11-07 22:55:49 +01:00
|
|
|
in pkgs.mkShell {
|
|
|
|
packages = with pkgs; [ pkg-config ncurses.dev bison ];
|
|
|
|
inputsFrom = [ self.packages.${system}.default ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-11-05 21:11:29 +01:00
|
|
|
hydraJobs = self.packages |> lib.foldlAttrs (jobs: system: packages: lib.recursiveUpdate jobs
|
2024-11-17 14:57:59 +01:00
|
|
|
(lib.mapAttrs (name: package: { ${system} = lib.hydraJob package; }) packages)) { };
|
2024-11-05 21:11:29 +01:00
|
|
|
};
|
|
|
|
}
|