deploy-rs/nix/tests/common.nix
stuebinm d3b11225fc test for non-flake build regressions
this adds a nixos vm test doing a deploy on a nix which does not have
flakes enabled, to guard against this breaking as it has done before [1].

The existing test infrastructure is changed slightly to make enabling
flakes configurable inside the vm's config.

[1] https://github.com/serokell/deploy-rs/pull/272
2024-06-12 13:38:22 +02:00

23 lines
607 B
Nix

# SPDX-FileCopyrightText: 2024 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: MPL-2.0
{inputs, pkgs, flakes, ...}: {
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
extraOptions = ''
experimental-features = ${if flakes then "nix-command flakes" else "nix-command"}
'';
settings = {
trusted-users = [ "root" "@wheel" ];
substituters = pkgs.lib.mkForce [];
};
};
virtualisation.graphics = false;
virtualisation.memorySize = 1536;
boot.loader.grub.enable = false;
documentation.enable = false;
}