aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-20 12:11:12 +0200
committerKarel Kočí <cynerd@email.cz>2022-04-20 12:11:12 +0200
commit22b1fcfeb53e0f712315c8008c8be9500832f6f7 (patch)
treecb22853d6106ba916a88aa948263a570a374d68b
parent94f863d84acb5340c3c999f1fa06678f7a5df9f5 (diff)
downloadnixturris-22b1fcfeb53e0f712315c8008c8be9500832f6f7.tar.gz
nixturris-22b1fcfeb53e0f712315c8008c8be9500832f6f7.tar.bz2
nixturris-22b1fcfeb53e0f712315c8008c8be9500832f6f7.zip
flake: allow access to the tarball nixos configuration
This way it is possible to access the nixos config and packages for boards with ease.
-rw-r--r--flake.lock6
-rw-r--r--flake.nix23
-rw-r--r--lib/default.nix4
-rw-r--r--nixos/modules/turris-defaults.nix2
4 files changed, 18 insertions, 17 deletions
diff --git a/flake.lock b/flake.lock
index 8e2a9a3..a7c7e36 100644
--- a/flake.lock
+++ b/flake.lock
@@ -16,11 +16,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1649619156,
- "narHash": "sha256-p0q4zpuKMwrzGF+5ZU7Thnpac5TinhDI9jr2mBxhV4w=",
+ "lastModified": 1650244918,
+ "narHash": "sha256-DsS5nxjTpnoUC4pNXJI1rit7TnDTij8vQDa5PtcDCD0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "e7d63bd0d50df412f5a1d8acfa3caae75522e347",
+ "rev": "7b38b03d76ab71bdc8dc325e3f6338d984cc35ca",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index e106ad8..6703267 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,21 +16,18 @@
lib = import ./lib { self = self; nixpkgs-stable = nixpkgs-stable; };
+ nixosConfigurations = {
+ tarballMox = self.lib.nixturrisTarballSystem { board = "mox"; };
+ tarballOmnia = self.lib.nixturrisTarballSystem { board = "omnia"; };
+ };
+
} // flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems ++ ["armv7l-linux"]) (
system: {
- packages = let
-
- createTarball = {...} @args: (self.lib.nixturrisSystem ({
- modules = [ (import ./tarball.nix args.board) ];
- } // args)).config.system.build.tarball;
-
- in {
-
- tarballMox = createTarball { board = "mox"; };
- tarballOmnia = createTarball { board = "omnia"; };
- crossTarballMox = createTarball { board = "mox"; system = system; };
- crossTarballOmnia = createTarball { board = "omnia"; system = 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;
} // flake-utils.lib.filterPackages system (flake-utils.lib.flattenTree (
import ./pkgs { nixpkgs = nixpkgs-stable.legacyPackages."${system}"; }
));
diff --git a/lib/default.nix b/lib/default.nix
index 163e06b..5627879 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -46,4 +46,8 @@
};
});
+ nixturrisTarballSystem = {...} @args: (nixturrisSystem ({
+ modules = [ (import ../tarball.nix args.board) ];
+ } // args));
+
}
diff --git a/nixos/modules/turris-defaults.nix b/nixos/modules/turris-defaults.nix
index 2f61827..fe9c4be 100644
--- a/nixos/modules/turris-defaults.nix
+++ b/nixos/modules/turris-defaults.nix
@@ -38,7 +38,7 @@ in {
] ++ optionals (config.turris.board == "mox") [
"earlycon=ar3700_uart,0xd0012000" "console=ttyMV0,115200"
"pcie_aspm=off" # Fix for crashes due to SError Interrupt on ath10k load
- ] ++ optional (config.turris.board == "omnia") [
+ ] ++ optionals (config.turris.board == "omnia") [
"earlyprintk" "console=ttyS0,115200"
];