summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-09 10:17:34 +0200
committerKarel Kočí <cynerd@email.cz>2022-04-09 10:17:34 +0200
commitbd9812fab0daea5f0911047a70494dc25089ac79 (patch)
treea96d9955b6aee8c5dcc435c551a5c2c724dd945e /flake.nix
downloadnixsentinel-bd9812fab0daea5f0911047a70494dc25089ac79.tar.gz
nixsentinel-bd9812fab0daea5f0911047a70494dc25089ac79.tar.bz2
nixsentinel-bd9812fab0daea5f0911047a70494dc25089ac79.zip
Initial versionHEADmaster
This was taken from nixturris.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix30
1 files changed, 30 insertions, 0 deletions
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 ];
+ };
+ }
+ );
+}