This repository has been archived on 2024-08-18. You can view files and clone it, but cannot push or open issues or pull requests.
linux-hardened/flake.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-31 11:00:49 +02:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
nixConfig = {
extra-substituters = [ "https://cache.kyouma.net" ];
extra-trusted-public-keys = [ "cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg=" ];
};
2024-08-12 21:12:18 +02:00
outputs = { self, nixpkgs, ... }:
let
inherit (nixpkgs) lib;
inherit (lib) mapAttrs;
2024-07-31 11:00:49 +02:00
2024-08-12 21:12:18 +02:00
profiles = import ./profiles.nix;
legacyPackages = mapAttrs (system: profile: import nixpkgs { inherit system; }) profiles;
linux-hardened = import ./linux-hardened.nix;
in {
packages = mapAttrs
(system: profiles: mapAttrs
(name: profile: linux-hardened legacyPackages.${system} profile)
profiles) profiles;
2024-07-31 11:00:49 +02:00
2024-08-12 21:12:18 +02:00
devShells = mapAttrs (system: profile:
let
pkgs = legacyPackages.${system};
dummy = linux-hardened pkgs { arch = ""; config = ./dummy.nix; firmware = [ ]; };
2024-07-31 11:00:49 +02:00
2024-08-12 21:12:18 +02:00
mkShell = packages:
pkgs.mkShell {
inherit packages;
shellHook = ''
exec $SHELL
'';
};
in {
default = mkShell
(with pkgs; dummy.nativeBuildInputs ++ [ ncurses pkg-config ]);
}) profiles;
2024-07-31 11:00:49 +02:00
2024-08-12 21:12:18 +02:00
hydraJobs = {
kernel = self.packages;
shell = self.devShells;
2024-07-31 11:00:49 +02:00
};
2024-08-12 21:12:18 +02:00
};
2024-07-31 11:00:49 +02:00
}