mirror of
https://github.com/serokell/deploy-rs.git
synced 2024-09-11 02:35:39 +03:00
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
23 lines
607 B
Nix
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;
|
|
}
|