From bd9812fab0daea5f0911047a70494dc25089ac79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 9 Apr 2022 10:17:34 +0200 Subject: Initial version This was taken from nixturris. --- flake.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ff75348 --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "Turris Sentinel flake"; + + outputs = { self, flake-utils, nixpkgs }: { + + overlays.default = final: prev: import ./pkgs { nixpkgs = prev; }; + overlay = self.overlays.default; # Backward compatibility + + nixosModules = import ./nixos; + nixosModule = { + imports = builtins.attrValues self.nixosModules; + nixpkgs.overlays = [ self.overlay ]; + }; + + } // flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems ++ ["armv7l-linux"]) ( + system: { + packages = flake-utils.lib.filterPackages system (flake-utils.lib.flattenTree ( + import ./pkgs { nixpkgs = nixpkgs.legacyPackages."${system}"; } + )); + + # The legacyPackages imported as overlay allows us to use pkgsCross to + # cross-compile those packages. + legacyPackages = import nixpkgs { + inherit system; + overlays = [ self.overlay ]; + crossOverlays = [ self.overlay ]; + }; + } + ); +} -- cgit v1.2.3