aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-26 13:54:42 +0200
committerKarel Kočí <cynerd@email.cz>2022-05-01 16:41:18 +0200
commitc385cc1c05efd2d44a02fd729a6a0241adf9004c (patch)
tree3bdf062805ad87c38e7ddca13e319b1be8324257 /flake.nix
parent22b1fcfeb53e0f712315c8008c8be9500832f6f7 (diff)
downloadnixturris-c385cc1c05efd2d44a02fd729a6a0241adf9004c.tar.gz
nixturris-c385cc1c05efd2d44a02fd729a6a0241adf9004c.tar.bz2
nixturris-c385cc1c05efd2d44a02fd729a6a0241adf9004c.zip
Switch to unstable
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix
index 6703267..0cca044 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,7 +3,7 @@
inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
- outputs = { self, flake-utils, nixpkgs-stable }: {
+ outputs = { self, flake-utils, nixpkgs, nixpkgs-stable }: {
overlays.default = final: prev: import ./pkgs { nixpkgs = prev; };
overlay = self.overlays.default; # Backward compatibility
@@ -14,27 +14,38 @@
nixpkgs.overlays = [ self.overlay ];
};
- lib = import ./lib { self = self; nixpkgs-stable = nixpkgs-stable; };
+ lib = import ./lib self;
nixosConfigurations = {
- tarballMox = self.lib.nixturrisTarballSystem { board = "mox"; };
- tarballOmnia = self.lib.nixturrisTarballSystem { board = "omnia"; };
+ tarballMox = self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs; };
+ tarballOmnia = self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs; };
+ stableTarballMox = self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs-stable; };
+ stableTarballOmnia = self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs-stable; };
};
} // flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems ++ ["armv7l-linux"]) (
system: {
- packages = {
- tarballMox = self.nixosConfigurations.tarballMox.config.system.build.tarball;
- tarballOmnia = self.nixosConfigurations.tarballOmnia.config.system.build.tarball;
- crossTarballMox = (self.lib.nixturrisTarballSystem { board = "mox"; system = system; }).config.system.build.tarball;
- crossTarballOmnia = (self.lib.nixturrisTarballSystem { board = "omnia"; system = system; }).config.system.build.tarball;
+ packages = let
+ tarball = nixos: nixos.config.system.build.tarball;
+ in {
+
+ tarballMox = tarball self.nixosConfigurations.tarballMox;
+ tarballOmnia = tarball self.nixosConfigurations.tarballOmnia;
+ stableTarballMox = tarball self.nixosConfigurations.stableTarballMox;
+ stableTarballOmnia = tarball self.nixosConfigurations.stableTarballOmnia;
+
+ crossTarballMox = tarball (self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs; system = system; });
+ crossTarballOmnia = tarball (self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs; system = system; });
+ stableCrossTarballMox = tarball (self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs-stable; system = system; });
+ stableCrossTarballOmnia = tarball (self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs-stable; system = system; });
+
} // flake-utils.lib.filterPackages system (flake-utils.lib.flattenTree (
- import ./pkgs { nixpkgs = nixpkgs-stable.legacyPackages."${system}"; }
+ import ./pkgs { nixpkgs = nixpkgs.legacyPackages."${system}"; }
));
# The legacyPackages imported as overlay allows us to use pkgsCross to
# cross-compile those packages.
- legacyPackages = import nixpkgs-stable {
+ legacyPackages = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
crossOverlays = [ self.overlay ];