2018-09-09 00:49:08 +03:00
|
|
|
|
with import ../lib;
|
|
|
|
|
|
|
|
|
|
{ nixpkgs ? { outPath = cleanSource ./..; revCount = 130979; shortRev = "gfedcba"; }
|
2013-10-10 14:16:20 +04:00
|
|
|
|
, stableBranch ? false
|
2017-04-15 00:59:54 +03:00
|
|
|
|
, supportedSystems ? [ "x86_64-linux" "aarch64-linux" ]
|
2018-09-09 00:49:12 +03:00
|
|
|
|
, configuration ? {}
|
2012-04-09 16:49:03 +04:00
|
|
|
|
}:
|
2012-04-05 17:00:30 +04:00
|
|
|
|
|
2018-01-16 19:29:43 +03:00
|
|
|
|
with import ../pkgs/top-level/release-lib.nix { inherit supportedSystems; };
|
2015-03-20 21:23:55 +03:00
|
|
|
|
|
2012-02-23 16:00:05 +04:00
|
|
|
|
let
|
|
|
|
|
|
2016-07-31 16:05:38 +03:00
|
|
|
|
version = fileContents ../.version;
|
2013-10-10 14:16:20 +04:00
|
|
|
|
versionSuffix =
|
2023-11-22 23:35:51 +03:00
|
|
|
|
(if stableBranch then "." else "pre") + "${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
|
2013-03-26 17:00:31 +04:00
|
|
|
|
|
2018-11-11 14:30:07 +03:00
|
|
|
|
# Run the tests for each platform. You can run a test by doing
|
2022-06-24 13:42:36 +03:00
|
|
|
|
# e.g. ‘nix-build release.nix -A tests.login.x86_64-linux’,
|
|
|
|
|
# or equivalently, ‘nix-build tests/login.nix’.
|
2022-06-06 20:25:04 +03:00
|
|
|
|
# See also nixosTests in pkgs/top-level/all-packages.nix
|
2018-11-11 14:30:07 +03:00
|
|
|
|
allTestsForSystem = system:
|
|
|
|
|
import ./tests/all-tests.nix {
|
|
|
|
|
inherit system;
|
2020-02-13 00:43:35 +03:00
|
|
|
|
pkgs = import ./.. { inherit system; };
|
2022-06-25 13:47:50 +03:00
|
|
|
|
callTest = config: {
|
|
|
|
|
${system} = hydraJob config.test;
|
2018-11-11 14:30:07 +03:00
|
|
|
|
};
|
2022-06-06 20:25:04 +03:00
|
|
|
|
} // {
|
|
|
|
|
# for typechecking of the scripts and evaluation of
|
|
|
|
|
# the nodes, without running VMs.
|
|
|
|
|
allDrivers =
|
|
|
|
|
import ./tests/all-tests.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
pkgs = import ./.. { inherit system; };
|
2022-06-25 13:47:50 +03:00
|
|
|
|
callTest = config: {
|
|
|
|
|
${system} = hydraJob config.driver;
|
2022-06-06 20:25:04 +03:00
|
|
|
|
};
|
|
|
|
|
};
|
2018-11-11 14:30:07 +03:00
|
|
|
|
};
|
2022-06-06 20:25:04 +03:00
|
|
|
|
|
2018-11-11 14:30:07 +03:00
|
|
|
|
allTests =
|
|
|
|
|
foldAttrs recursiveUpdate {} (map allTestsForSystem supportedSystems);
|
2014-04-14 16:02:44 +04:00
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
pkgs = import ./.. { system = "x86_64-linux"; };
|
2012-04-11 00:28:06 +04:00
|
|
|
|
|
2012-02-23 16:00:05 +04:00
|
|
|
|
|
2023-05-15 11:38:56 +03:00
|
|
|
|
versionModule = { config, ... }: {
|
|
|
|
|
system.nixos.versionSuffix = versionSuffix;
|
|
|
|
|
system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev;
|
|
|
|
|
|
|
|
|
|
# At creation time we do not have state yet, so just default to latest.
|
|
|
|
|
system.stateVersion = config.system.nixos.version;
|
|
|
|
|
};
|
2013-07-02 15:33:27 +04:00
|
|
|
|
|
2018-11-07 12:07:38 +03:00
|
|
|
|
makeModules = module: rest: [ configuration versionModule module rest ];
|
2013-07-02 15:33:27 +04:00
|
|
|
|
|
2012-02-23 16:00:05 +04:00
|
|
|
|
makeIso =
|
2018-07-20 23:56:59 +03:00
|
|
|
|
{ module, type, system, ... }:
|
2012-02-23 16:00:05 +04:00
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
with import ./.. { inherit system; };
|
2012-02-23 16:00:05 +04:00
|
|
|
|
|
2016-03-15 15:48:45 +03:00
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
2018-11-07 12:07:38 +03:00
|
|
|
|
modules = makeModules module {
|
|
|
|
|
isoImage.isoBaseName = "nixos-${type}";
|
|
|
|
|
};
|
2016-03-15 15:48:45 +03:00
|
|
|
|
}).config.system.build.isoImage);
|
2012-02-23 16:00:05 +04:00
|
|
|
|
|
|
|
|
|
|
2018-03-31 20:30:08 +03:00
|
|
|
|
makeSdImage =
|
2018-07-20 23:56:59 +03:00
|
|
|
|
{ module, system, ... }:
|
2018-03-31 20:30:08 +03:00
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
with import ./.. { inherit system; };
|
2018-03-31 20:30:08 +03:00
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
2018-11-07 12:07:38 +03:00
|
|
|
|
modules = makeModules module {};
|
2018-03-31 20:30:08 +03:00
|
|
|
|
}).config.system.build.sdImage);
|
|
|
|
|
|
|
|
|
|
|
2012-02-23 16:00:05 +04:00
|
|
|
|
makeSystemTarball =
|
2013-03-26 17:00:31 +04:00
|
|
|
|
{ module, maintainers ? ["viric"], system }:
|
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
with import ./.. { inherit system; };
|
2012-02-23 16:00:05 +04:00
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
|
|
config = (import lib/eval-config.nix {
|
2012-03-05 00:57:34 +04:00
|
|
|
|
inherit system;
|
2018-11-07 12:07:38 +03:00
|
|
|
|
modules = makeModules module {};
|
2012-02-23 16:00:05 +04:00
|
|
|
|
}).config;
|
|
|
|
|
|
|
|
|
|
tarball = config.system.build.tarball;
|
2013-07-02 15:33:27 +04:00
|
|
|
|
|
2012-02-23 16:00:05 +04:00
|
|
|
|
in
|
|
|
|
|
tarball //
|
|
|
|
|
{ meta = {
|
2021-01-23 04:33:55 +03:00
|
|
|
|
description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.linux-kernel.name}";
|
2015-03-20 21:23:55 +03:00
|
|
|
|
maintainers = map (x: lib.maintainers.${x}) maintainers;
|
2012-02-23 16:00:05 +04:00
|
|
|
|
};
|
|
|
|
|
inherit config;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2014-09-18 18:21:00 +04:00
|
|
|
|
makeClosure = module: buildFromConfig module (config: config.system.build.toplevel);
|
|
|
|
|
|
|
|
|
|
|
2015-03-20 21:23:55 +03:00
|
|
|
|
buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix {
|
2014-08-22 13:37:31 +04:00
|
|
|
|
inherit system;
|
2018-11-07 12:07:38 +03:00
|
|
|
|
modules = makeModules module
|
2018-07-20 23:56:59 +03:00
|
|
|
|
({ ... }:
|
2015-03-20 21:23:55 +03:00
|
|
|
|
{ fileSystems."/".device = mkDefault "/dev/sda1";
|
|
|
|
|
boot.loader.grub.device = mkDefault "/dev/sda";
|
2014-08-22 13:37:31 +04:00
|
|
|
|
});
|
2014-09-18 18:21:00 +04:00
|
|
|
|
}).config));
|
2014-08-22 13:37:31 +04:00
|
|
|
|
|
2018-09-09 00:49:06 +03:00
|
|
|
|
makeNetboot = { module, system, ... }:
|
2017-04-15 00:59:54 +03:00
|
|
|
|
let
|
2018-09-09 00:49:06 +03:00
|
|
|
|
configEvaled = import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
2018-11-07 12:07:38 +03:00
|
|
|
|
modules = makeModules module {};
|
2018-09-09 00:49:06 +03:00
|
|
|
|
};
|
2018-01-11 19:46:49 +03:00
|
|
|
|
build = configEvaled.config.system.build;
|
2021-01-23 04:33:55 +03:00
|
|
|
|
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target;
|
2017-04-15 00:59:54 +03:00
|
|
|
|
in
|
2023-08-04 23:19:30 +03:00
|
|
|
|
configEvaled.pkgs.symlinkJoin {
|
2018-01-11 19:46:49 +03:00
|
|
|
|
name = "netboot";
|
|
|
|
|
paths = [
|
2017-04-15 00:59:54 +03:00
|
|
|
|
build.netbootRamdisk
|
|
|
|
|
build.kernel
|
|
|
|
|
build.netbootIpxeScript
|
|
|
|
|
];
|
|
|
|
|
postBuild = ''
|
|
|
|
|
mkdir -p $out/nix-support
|
2018-07-25 15:07:58 +03:00
|
|
|
|
echo "file ${kernelTarget} ${build.kernel}/${kernelTarget}" >> $out/nix-support/hydra-build-products
|
|
|
|
|
echo "file initrd ${build.netbootRamdisk}/initrd" >> $out/nix-support/hydra-build-products
|
|
|
|
|
echo "file ipxe ${build.netbootIpxeScript}/netboot.ipxe" >> $out/nix-support/hydra-build-products
|
2017-04-15 00:59:54 +03:00
|
|
|
|
'';
|
2018-01-11 19:47:23 +03:00
|
|
|
|
preferLocalBuild = true;
|
2017-04-15 00:59:54 +03:00
|
|
|
|
};
|
|
|
|
|
|
2013-10-24 21:31:51 +04:00
|
|
|
|
in rec {
|
2008-12-17 16:25:23 +03:00
|
|
|
|
|
2015-06-14 04:55:29 +03:00
|
|
|
|
channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; };
|
2009-08-31 18:56:19 +04:00
|
|
|
|
|
2018-09-06 22:17:44 +03:00
|
|
|
|
manualHTML = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualHTML);
|
|
|
|
|
manual = manualHTML; # TODO(@oxij): remove eventually
|
2018-07-20 23:56:59 +03:00
|
|
|
|
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
|
2023-08-12 18:47:43 +03:00
|
|
|
|
nixos-configuration-reference-manpage = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.nixos-configuration-reference-manpage);
|
2018-07-20 23:56:59 +03:00
|
|
|
|
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
2016-02-03 14:16:33 +03:00
|
|
|
|
|
2013-03-26 17:00:31 +04:00
|
|
|
|
|
2014-10-09 20:40:37 +04:00
|
|
|
|
# Build the initial ramdisk so Hydra can keep track of its size over time.
|
2018-07-20 23:56:59 +03:00
|
|
|
|
initialRamdisk = buildFromConfig ({ ... }: { }) (config: config.system.build.initialRamdisk);
|
2014-10-09 20:40:37 +04:00
|
|
|
|
|
2022-06-09 21:00:26 +03:00
|
|
|
|
kexec = forMatchingSystems supportedSystems (system: (import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules = [
|
|
|
|
|
./modules/installer/netboot/netboot-minimal.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.kexecTree);
|
|
|
|
|
|
2021-04-23 19:34:51 +03:00
|
|
|
|
netboot = forMatchingSystems supportedSystems (system: makeNetboot {
|
2018-09-09 00:49:06 +03:00
|
|
|
|
module = ./modules/installer/netboot/netboot-minimal.nix;
|
2018-01-16 19:42:47 +03:00
|
|
|
|
inherit system;
|
|
|
|
|
});
|
2016-04-08 16:53:27 +03:00
|
|
|
|
|
2013-10-31 11:48:57 +04:00
|
|
|
|
iso_minimal = forAllSystems (system: makeIso {
|
2013-03-26 17:00:31 +04:00
|
|
|
|
module = ./modules/installer/cd-dvd/installation-cd-minimal.nix;
|
|
|
|
|
type = "minimal";
|
|
|
|
|
inherit system;
|
2013-04-06 20:24:12 +04:00
|
|
|
|
});
|
|
|
|
|
|
2022-09-30 02:42:19 +03:00
|
|
|
|
iso_plasma5 = forMatchingSystems supportedSystems (system: makeIso {
|
2022-04-04 16:58:17 +03:00
|
|
|
|
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix;
|
2019-08-08 02:53:47 +03:00
|
|
|
|
type = "plasma5";
|
2013-03-26 17:00:31 +04:00
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2022-09-30 02:42:19 +03:00
|
|
|
|
iso_gnome = forMatchingSystems supportedSystems (system: makeIso {
|
2022-04-04 16:58:17 +03:00
|
|
|
|
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix;
|
2020-04-21 22:35:32 +03:00
|
|
|
|
type = "gnome";
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2022-12-23 07:00:14 +03:00
|
|
|
|
# A variant with a more recent (but possibly less stable) kernel that might support more hardware.
|
|
|
|
|
# This variant keeps zfs support enabled, hoping it will build and work.
|
2018-12-19 21:10:48 +03:00
|
|
|
|
iso_minimal_new_kernel = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeIso {
|
2014-06-06 01:00:25 +04:00
|
|
|
|
module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix;
|
|
|
|
|
type = "minimal-new-kernel";
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2022-12-23 07:00:14 +03:00
|
|
|
|
# A variant with a more recent (but possibly less stable) kernel that might support more hardware.
|
|
|
|
|
# ZFS support disabled since it is unlikely to support the latest kernel.
|
|
|
|
|
iso_minimal_new_kernel_no_zfs = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeIso {
|
|
|
|
|
module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix;
|
|
|
|
|
type = "minimal-new-kernel-no-zfs";
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2018-04-15 05:32:59 +03:00
|
|
|
|
sd_image = forMatchingSystems [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ] (system: makeSdImage {
|
|
|
|
|
module = {
|
2021-02-03 00:14:06 +03:00
|
|
|
|
armv6l-linux = ./modules/installer/sd-card/sd-image-raspberrypi-installer.nix;
|
|
|
|
|
armv7l-linux = ./modules/installer/sd-card/sd-image-armv7l-multiplatform-installer.nix;
|
|
|
|
|
aarch64-linux = ./modules/installer/sd-card/sd-image-aarch64-installer.nix;
|
2018-04-15 05:32:59 +03:00
|
|
|
|
}.${system};
|
2018-03-31 20:30:08 +03:00
|
|
|
|
inherit system;
|
|
|
|
|
});
|
2013-03-26 17:00:31 +04:00
|
|
|
|
|
2018-12-26 02:58:04 +03:00
|
|
|
|
sd_image_new_kernel = forMatchingSystems [ "aarch64-linux" ] (system: makeSdImage {
|
|
|
|
|
module = {
|
2021-02-03 00:14:06 +03:00
|
|
|
|
aarch64-linux = ./modules/installer/sd-card/sd-image-aarch64-new-kernel-installer.nix;
|
2018-12-26 02:58:04 +03:00
|
|
|
|
}.${system};
|
|
|
|
|
type = "minimal-new-kernel";
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2022-12-23 07:07:19 +03:00
|
|
|
|
sd_image_new_kernel_no_zfs = forMatchingSystems [ "aarch64-linux" ] (system: makeSdImage {
|
|
|
|
|
module = {
|
|
|
|
|
aarch64-linux = ./modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix;
|
|
|
|
|
}.${system};
|
|
|
|
|
type = "minimal-new-kernel-no-zfs";
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2013-10-08 17:40:48 +04:00
|
|
|
|
# A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
|
2018-03-20 04:29:48 +03:00
|
|
|
|
ova = forMatchingSystems [ "x86_64-linux" ] (system:
|
2013-08-26 16:06:00 +04:00
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
with import ./.. { inherit system; };
|
2013-07-02 02:23:48 +04:00
|
|
|
|
|
2016-03-15 15:34:41 +03:00
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ versionModule
|
|
|
|
|
./modules/installer/virtualbox-demo.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.virtualBoxOVA)
|
2013-08-26 16:06:00 +04:00
|
|
|
|
|
|
|
|
|
);
|
2013-07-02 02:23:48 +04:00
|
|
|
|
|
2022-05-08 20:58:05 +03:00
|
|
|
|
# KVM image for proxmox in VMA format
|
|
|
|
|
proxmoxImage = forMatchingSystems [ "x86_64-linux" ] (system:
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules = [
|
|
|
|
|
./modules/virtualisation/proxmox-image.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.VMA)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
# LXC tarball for proxmox
|
|
|
|
|
proxmoxLXC = forMatchingSystems [ "x86_64-linux" ] (system:
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules = [
|
|
|
|
|
./modules/virtualisation/proxmox-lxc.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.tarball)
|
|
|
|
|
);
|
2013-07-02 02:23:48 +04:00
|
|
|
|
|
2019-05-31 20:23:30 +03:00
|
|
|
|
# A disk image that can be imported to Amazon EC2 and registered as an AMI
|
|
|
|
|
amazonImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
2020-02-13 00:43:35 +03:00
|
|
|
|
with import ./.. { inherit system; };
|
2019-05-31 20:23:30 +03:00
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
2020-01-04 01:07:59 +03:00
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
2019-05-31 20:23:30 +03:00
|
|
|
|
./maintainers/scripts/ec2/amazon-image.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.amazonImage)
|
|
|
|
|
|
|
|
|
|
);
|
2021-08-25 16:38:46 +03:00
|
|
|
|
amazonImageZfs = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
|
|
|
|
./maintainers/scripts/ec2/amazon-image-zfs.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.amazonImage)
|
|
|
|
|
|
|
|
|
|
);
|
2019-05-31 20:23:30 +03:00
|
|
|
|
|
|
|
|
|
|
2021-05-01 05:28:31 +03:00
|
|
|
|
# Test job for https://github.com/NixOS/nixpkgs/issues/121354 to test
|
|
|
|
|
# automatic sizing without blocking the channel.
|
|
|
|
|
amazonImageAutomaticSize = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
|
|
|
|
./maintainers/scripts/ec2/amazon-image.nix
|
|
|
|
|
({ ... }: { amazonImage.sizeMB = "auto"; })
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.amazonImage)
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
2021-04-28 07:06:20 +03:00
|
|
|
|
# An image that can be imported into lxd and used for container creation
|
2023-08-25 06:00:42 +03:00
|
|
|
|
lxdContainerImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
2021-04-28 07:06:20 +03:00
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
2023-08-25 06:00:42 +03:00
|
|
|
|
./maintainers/scripts/lxd/lxd-container-image.nix
|
2021-04-28 07:06:20 +03:00
|
|
|
|
];
|
2021-10-19 17:50:51 +03:00
|
|
|
|
}).config.system.build.tarball)
|
2021-04-28 07:06:20 +03:00
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
2023-10-12 17:52:05 +03:00
|
|
|
|
lxdContainerImageSquashfs = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
|
|
|
|
./maintainers/scripts/lxd/lxd-container-image.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.squashfs)
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
2021-04-28 07:06:20 +03:00
|
|
|
|
# Metadata for the lxd image
|
2023-08-25 06:00:42 +03:00
|
|
|
|
lxdContainerMeta = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
2021-04-28 07:06:20 +03:00
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
2023-08-25 06:00:42 +03:00
|
|
|
|
./maintainers/scripts/lxd/lxd-container-image.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.metadata)
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
# An image that can be imported into lxd and used for container creation
|
|
|
|
|
lxdVirtualMachineImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
|
|
|
|
./maintainers/scripts/lxd/lxd-virtual-machine-image.nix
|
|
|
|
|
];
|
|
|
|
|
}).config.system.build.qemuImage)
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
# Metadata for the lxd image
|
|
|
|
|
lxdVirtualMachineImageMeta = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
|
|
|
|
|
|
with import ./.. { inherit system; };
|
|
|
|
|
|
|
|
|
|
hydraJob ((import lib/eval-config.nix {
|
|
|
|
|
inherit system;
|
|
|
|
|
modules =
|
|
|
|
|
[ configuration
|
|
|
|
|
versionModule
|
|
|
|
|
./maintainers/scripts/lxd/lxd-virtual-machine-image.nix
|
2021-04-28 07:06:20 +03:00
|
|
|
|
];
|
|
|
|
|
}).config.system.build.metadata)
|
|
|
|
|
|
|
|
|
|
);
|
2021-05-01 05:28:31 +03:00
|
|
|
|
|
2014-09-25 02:20:53 +04:00
|
|
|
|
# Ensure that all packages used by the minimal NixOS config end up in the channel.
|
|
|
|
|
dummy = forAllSystems (system: pkgs.runCommand "dummy"
|
2014-09-25 19:51:09 +04:00
|
|
|
|
{ toplevel = (import lib/eval-config.nix {
|
2014-09-25 02:20:53 +04:00
|
|
|
|
inherit system;
|
2018-07-20 23:56:59 +03:00
|
|
|
|
modules = singleton ({ ... }:
|
2015-03-20 21:23:55 +03:00
|
|
|
|
{ fileSystems."/".device = mkDefault "/dev/sda1";
|
|
|
|
|
boot.loader.grub.device = mkDefault "/dev/sda";
|
2023-10-27 11:28:25 +03:00
|
|
|
|
system.stateVersion = mkDefault lib.trivial.release;
|
2014-09-25 19:51:09 +04:00
|
|
|
|
});
|
|
|
|
|
}).config.system.build.toplevel;
|
2015-12-29 19:21:49 +03:00
|
|
|
|
preferLocalBuild = true;
|
2014-09-25 02:20:53 +04:00
|
|
|
|
}
|
2014-09-25 19:51:09 +04:00
|
|
|
|
"mkdir $out; ln -s $toplevel $out/dummy");
|
2014-09-25 02:20:53 +04:00
|
|
|
|
|
|
|
|
|
|
2014-12-12 00:58:17 +03:00
|
|
|
|
# Provide container tarball for lxc, libvirt-lxc, docker-lxc, ...
|
2014-12-12 22:28:01 +03:00
|
|
|
|
containerTarball = forAllSystems (system: makeSystemTarball {
|
2014-12-12 00:58:17 +03:00
|
|
|
|
module = ./modules/virtualisation/lxc-container.nix;
|
|
|
|
|
inherit system;
|
|
|
|
|
});
|
|
|
|
|
|
2018-11-11 14:30:07 +03:00
|
|
|
|
tests = allTests;
|
2014-08-22 13:37:31 +04:00
|
|
|
|
|
|
|
|
|
/* Build a bunch of typical closures so that Hydra can keep track of
|
|
|
|
|
the evolution of closure sizes. */
|
|
|
|
|
|
|
|
|
|
closures = {
|
|
|
|
|
|
2018-07-20 23:56:59 +03:00
|
|
|
|
smallContainer = makeClosure ({ ... }:
|
2014-08-22 13:37:31 +04:00
|
|
|
|
{ boot.isContainer = true;
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
});
|
|
|
|
|
|
2018-07-20 23:56:59 +03:00
|
|
|
|
tinyContainer = makeClosure ({ ... }:
|
2014-08-22 13:37:31 +04:00
|
|
|
|
{ boot.isContainer = true;
|
|
|
|
|
imports = [ modules/profiles/minimal.nix ];
|
|
|
|
|
});
|
|
|
|
|
|
2018-07-20 23:56:59 +03:00
|
|
|
|
ec2 = makeClosure ({ ... }:
|
2014-08-22 13:37:31 +04:00
|
|
|
|
{ imports = [ modules/virtualisation/amazon-image.nix ];
|
|
|
|
|
});
|
|
|
|
|
|
2018-07-20 23:56:59 +03:00
|
|
|
|
kde = makeClosure ({ ... }:
|
2014-08-22 13:37:31 +04:00
|
|
|
|
{ services.xserver.enable = true;
|
2017-02-10 05:25:03 +03:00
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
2017-03-03 16:24:58 +03:00
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
2014-08-22 13:37:31 +04:00
|
|
|
|
});
|
|
|
|
|
|
2018-07-20 23:56:59 +03:00
|
|
|
|
xfce = makeClosure ({ ... }:
|
2014-08-22 13:37:31 +04:00
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
|
services.xserver.desktopManager.xfce.enable = true;
|
|
|
|
|
});
|
|
|
|
|
|
2021-05-08 00:18:14 +03:00
|
|
|
|
gnome = makeClosure ({ ... }:
|
2019-09-18 00:48:40 +03:00
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
2021-05-08 00:18:14 +03:00
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
2019-09-18 00:48:40 +03:00
|
|
|
|
});
|
|
|
|
|
|
2020-07-26 22:30:08 +03:00
|
|
|
|
pantheon = makeClosure ({ ... }:
|
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
|
services.xserver.desktopManager.pantheon.enable = true;
|
|
|
|
|
});
|
|
|
|
|
|
2023-05-08 13:25:41 +03:00
|
|
|
|
deepin = makeClosure ({ ... }:
|
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
|
services.xserver.displayManager.lightdm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.deepin.enable = true;
|
|
|
|
|
});
|
|
|
|
|
|
2014-08-22 13:37:31 +04:00
|
|
|
|
# Linux/Apache/PostgreSQL/PHP stack.
|
|
|
|
|
lapp = makeClosure ({ pkgs, ... }:
|
|
|
|
|
{ services.httpd.enable = true;
|
|
|
|
|
services.httpd.adminAddr = "foo@example.org";
|
2020-05-01 11:05:25 +03:00
|
|
|
|
services.httpd.enablePHP = true;
|
2014-08-22 13:37:31 +04:00
|
|
|
|
services.postgresql.enable = true;
|
2018-12-19 11:59:32 +03:00
|
|
|
|
services.postgresql.package = pkgs.postgresql;
|
2014-08-22 13:37:31 +04:00
|
|
|
|
});
|
|
|
|
|
};
|
2013-03-26 17:00:31 +04:00
|
|
|
|
}
|