diff options
author | Karel Kočí <cynerd@email.cz> | 2022-10-25 16:45:13 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-10-25 16:45:13 +0200 |
commit | 06293bfbb5082dc636358d49f3e6fea88c4f2a67 (patch) | |
tree | 194d9b2c7437fa87f372b7c264d7656999d12249 /lib/default.nix | |
parent | 5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d (diff) | |
download | nixturris-06293bfbb5082dc636358d49f3e6fea88c4f2a67.tar.gz nixturris-06293bfbb5082dc636358d49f3e6fea88c4f2a67.tar.bz2 nixturris-06293bfbb5082dc636358d49f3e6fea88c4f2a67.zip |
Try to rework minimal system
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/lib/default.nix b/lib/default.nix index 1136741..1211cf9 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -19,25 +19,32 @@ modules ? [], override ? {} }: nixpkgs.lib.nixosSystem ({ - system = boardSystem.${board}.system; modules = [ self.nixosModules.default - { turris.board = board; } + { + nixpkgs.system = boardSystem.${board}.system; + turris.board = board; + } ] ++ modules; } // 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 + # TODO this does not work right now as it requires just load of work to do. + # The nix-daemon pulls in xserver and the result is that pretty much + # everything has to be included in such case. nixturrisMinSystem = { - nixpkgs, + board, + nixpkgs ? nixpkgsDefault, modules ? [], - ... - } @args: self.lib.nixturrisSystem (args // { - nixpkgs = nixpkgs; - modules = modules ++ [ ../nixos/nixos-modules-minfake.nix ]; - override = { - baseModules = import ../nixos/nixos-modules.nix nixpkgs; - }; - }); + override ? {} + }:nixpkgs.lib.nixos.evalModules ({ + modules = (map (v: nixpkgs.outPath + "/nixos/modules" + v) (import ./nixos-min-modules.nix)) ++ [ + self.nixosModules.default + { + nixpkgs.system = boardSystem.${board}.system; + turris.board = board; + } + ] ++ modules; + } // override); } |