From 7cdb1bb8aa7a0f559958f56fb53e65608d751117 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 22 Aug 2014 11:37:31 +0200 Subject: [PATCH] Build a few NixOS system closures on Hydra This will allow us to keep track of the evolution of closure sizes of some typical configurations. (Hydra stores closure sizes in its database.) --- nixos/release.nix | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/nixos/release.nix b/nixos/release.nix index ed413d3e928f..0620b46d46ad 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -78,6 +78,16 @@ let }; + makeClosure = module: forAllSystems (system: (import ./lib/eval-config.nix { + inherit system; + modules = [ module ] ++ lib.singleton + ({ config, lib, ... }: + { fileSystems."/".device = lib.mkDefault "/dev/sda1"; + boot.loader.grub.device = lib.mkDefault "/dev/sda"; + }); + }).config.system.build.toplevel); + + in rec { channel = @@ -242,4 +252,46 @@ in rec { tests.udisks2 = callTest tests/udisks2.nix {}; tests.xfce = callTest tests/xfce.nix {}; + + /* Build a bunch of typical closures so that Hydra can keep track of + the evolution of closure sizes. */ + + closures = { + + smallContainer = makeClosure ({ pkgs, ... }: + { boot.isContainer = true; + services.openssh.enable = true; + }); + + tinyContainer = makeClosure ({ pkgs, ... }: + { boot.isContainer = true; + imports = [ modules/profiles/minimal.nix ]; + }); + + ec2 = makeClosure ({ pkgs, ... }: + { imports = [ modules/virtualisation/amazon-image.nix ]; + }); + + kde = makeClosure ({ pkgs, ... }: + { services.xserver.enable = true; + services.xserver.displayManager.kdm.enable = true; + services.xserver.desktopManager.kde4.enable = true; + }); + + xfce = makeClosure ({ pkgs, ... }: + { services.xserver.enable = true; + services.xserver.desktopManager.xfce.enable = true; + }); + + # Linux/Apache/PostgreSQL/PHP stack. + lapp = makeClosure ({ pkgs, ... }: + { services.httpd.enable = true; + services.httpd.adminAddr = "foo@example.org"; + services.postgresql.enable = true; + services.postgresql.package = pkgs.postgresql93; + environment.systemPackages = [ pkgs.php ]; + }); + + }; + }