diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-11-07 09:07:38 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2018-11-08 05:20:09 +0000 |
commit | 2403464720f641bd6b3ab92a9c0386d36d0a9e83 (patch) | |
tree | c244f49e5ce3475710c5c5a140688937084dbb45 /nixos/release.nix | |
parent | 26cce54d88ff439a6141cbbdc8c1db8c21284b2a (diff) |
nixos/release.nix: generalize `modules` copy-paste into `makeModules`
Diffstat (limited to 'nixos/release.nix')
-rw-r--r-- | nixos/release.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/release.nix b/nixos/release.nix index 4647f28be1863..e18b6ad310fd9 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -45,6 +45,7 @@ let system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev; }; + makeModules = module: rest: [ configuration versionModule module rest ]; makeIso = { module, type, system, ... }: @@ -53,7 +54,9 @@ let hydraJob ((import lib/eval-config.nix { inherit system; - modules = [ configuration module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ]; + modules = makeModules module { + isoImage.isoBaseName = "nixos-${type}"; + }; }).config.system.build.isoImage); @@ -64,7 +67,7 @@ let hydraJob ((import lib/eval-config.nix { inherit system; - modules = [ configuration module versionModule ]; + modules = makeModules module {}; }).config.system.build.sdImage); @@ -77,7 +80,7 @@ let config = (import lib/eval-config.nix { inherit system; - modules = [ configuration module versionModule ]; + modules = makeModules module {}; }).config; tarball = config.system.build.tarball; @@ -97,7 +100,7 @@ let buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix { inherit system; - modules = [ configuration module versionModule ] ++ singleton + modules = makeModules module ({ ... }: { fileSystems."/".device = mkDefault "/dev/sda1"; boot.loader.grub.device = mkDefault "/dev/sda"; @@ -108,7 +111,7 @@ let let configEvaled = import lib/eval-config.nix { inherit system; - modules = [ module versionModule ]; + modules = makeModules module {}; }; build = configEvaled.config.system.build; kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; |