diff options
author | Karel Kočí <cynerd@email.cz> | 2022-04-09 18:54:00 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-04-12 21:48:06 +0200 |
commit | b1bd3d7b5cf5d2dfb94493bb73140e6d8210f401 (patch) | |
tree | 70f840066e93bea2058a0a79e618dc0337a4c724 /flake.nix | |
parent | fb73330d0ccdc50c79a8fe0675c51022ee64b367 (diff) | |
download | nixturris-b1bd3d7b5cf5d2dfb94493bb73140e6d8210f401.tar.gz nixturris-b1bd3d7b5cf5d2dfb94493bb73140e6d8210f401.tar.bz2 nixturris-b1bd3d7b5cf5d2dfb94493bb73140e6d8210f401.zip |
Refactor Mox support
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -1,9 +1,9 @@ { description = "Turris flake"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; + inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11"; - outputs = { self, flake-utils, nixpkgs }: { + outputs = { self, flake-utils, nixpkgs-stable }: { overlays.default = final: prev: import ./pkgs { nixpkgs = prev; }; overlay = self.overlays.default; # Backward compatibility @@ -16,7 +16,7 @@ lib = { # The full NixOS system - nixturrisSystem = {board, modules ? [], override ? {}}: let + nixturrisSystem = {nixpkgs ? nixpkgs-stable, board, modules ? [], override ? {}}: let pkgs = if board == "omnia" then nixpkgs.legacyPackages.armv7l-linux else nixpkgs.legacyPackages.aarch64-linux; @@ -29,8 +29,9 @@ } // override); # The minimalized system to decrease amount of ram needed for rebuild # TODO this does not work right now as it requires just load of work to do - nixturrisMinSystem = {modules, ...} @args: + nixturrisMinSystem = {nixpkgs ? nixpkgs-stable, modules, ...} @args: self.lib.nixturrisSystem (args // { + nixpkgs = nixpkgs; modules = modules ++ [ ./nixos/nixos-modules-minfake.nix ]; override = { baseModules = import ./nixos/nixos-modules.nix nixpkgs; @@ -42,23 +43,23 @@ system: { packages = let - createMedkit = board: (self.lib.nixturrisSystem { + createTarball = board: (self.lib.nixturrisSystem { board = board; - modules = [ (import ./medkit.nix board) ]; + modules = [ (import ./tarball.nix board) ]; }).config.system.build.tarball; in { - medkit-mox = createMedkit "mox"; - medkit-omnia = createMedkit "omnia"; + tarball-mox = createTarball "mox"; + tarball-omnia = createTarball "omnia"; } // flake-utils.lib.filterPackages system (flake-utils.lib.flattenTree ( - import ./pkgs { nixpkgs = nixpkgs.legacyPackages."${system}"; } + import ./pkgs { nixpkgs = nixpkgs-stable.legacyPackages."${system}"; } )); # The legacyPackages imported as overlay allows us to use pkgsCross to # cross-compile those packages. - legacyPackages = import nixpkgs { + legacyPackages = import nixpkgs-stable { inherit system; overlays = [ self.overlay ]; crossOverlays = [ self.overlay ]; |