nixosTests.*: update to use virtualisation.fileSystems

master
Maciej Krüger 2021-02-14 12:23:50 +01:00
parent 45b8e83128
commit 59eb6d3ee3
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F
14 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }:
${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux2 /dev/vdc
'';
virtualisation.emptyDiskImages = [ 4096 4096 ];
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/aux1" = { # filesystem configured to be deduplicated
device = "/dev/disk/by-label/aux1";
fsType = "btrfs";

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix {
machine = { lib, ... }: {
virtualisation.emptyDiskImages = [ 1 ];
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/mnt" = {
device = "/dev/vdb";
fsType = "ext4";

View File

@ -3,7 +3,7 @@ import ./make-test-python.nix ({pkgs, lib, ...}:
let
client = { pkgs, ... } : {
environment.systemPackages = [ pkgs.glusterfs ];
fileSystems = pkgs.lib.mkVMOverride
virtualisation.fileSystems =
{ "/gluster" =
{ device = "server1:/gv0";
fsType = "glusterfs";
@ -22,7 +22,7 @@ let
virtualisation.emptyDiskImages = [ 1024 ];
fileSystems = pkgs.lib.mkVMOverride
virtualisation.fileSystems =
{ "/data" =
{ device = "/dev/disk/by-label/data";
fsType = "ext4";

View File

@ -18,7 +18,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
boot.initrd.postDeviceCommands = ''
${pkgs.dosfstools}/bin/mkfs.vfat -n EFISYS /dev/vdb
'';
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/efi" = {
device = "/dev/disk/by-label/EFISYS";
fsType = "vfat";

View File

@ -7,7 +7,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }:
nodes = rec {
a = {
environment.systemPackages = with pkgs; [ sshfs ];
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/ssh" = {
device = "alice@b:/";
fsType = "fuse.sshfs";

View File

@ -16,7 +16,7 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
environment.variables.EDITOR = mkOverride 0 "emacs";
documentation.nixos.enable = mkOverride 0 true;
systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ];
fileSystems = mkVMOverride { "/tmp2" =
virtualisation.fileSystems = { "/tmp2" =
{ fsType = "tmpfs";
options = [ "mode=1777" "noauto" ];
};

View File

@ -15,7 +15,7 @@ in {
echo "http://nextcloud/remote.php/webdav/ ${adminuser} ${adminpass}" > /tmp/davfs2-secrets
chmod 600 /tmp/davfs2-secrets
'';
fileSystems = pkgs.lib.mkVMOverride {
virtualisation.fileSystems = {
"/mnt/dav" = {
device = "http://nextcloud/remote.php/webdav/";
fsType = "davfs";

View File

@ -40,7 +40,7 @@ in
networking.domain = "nfs.test";
networking.hostName = "client";
fileSystems = lib.mkVMOverride
virtualisation.fileSystems =
{ "/data" = {
device = "server.nfs.test:/";
fsType = "nfs";

View File

@ -4,7 +4,7 @@ let
client =
{ pkgs, ... }:
{ fileSystems = pkgs.lib.mkVMOverride
{ virtualisation.fileSystems =
{ "/data" =
{ # nfs4 exports the export with fsid=0 as a virtual root directory
device = if (version == 4) then "server:/" else "server:/data";

View File

@ -9,7 +9,7 @@ let
virtualisation.emptyDiskImages = [ 4096 ];
fileSystems = pkgs.lib.mkVMOverride
virtualisation.fileSystems =
{ "/data" =
{ device = "/dev/disk/by-label/data";
fsType = "ext4";

View File

@ -8,7 +8,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
nodes =
{ client =
{ pkgs, ... }:
{ fileSystems = pkgs.lib.mkVMOverride
{ virtualisation.fileSystems =
{ "/public" = {
fsType = "cifs";
device = "//server/public";

View File

@ -9,7 +9,7 @@ import ./make-test-python.nix ({ ... }:
virtualisation.emptyDiskImages = [ 4096 ];
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/home" = {
device = "/dev/disk/by-label/aux";
fsType = "btrfs";

View File

@ -9,7 +9,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
environment.systemPackages = [ pkgs.cryptsetup ];
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/test-x-initrd-mount" = {
device = "/dev/vdb";
fsType = "ext2";

View File

@ -29,7 +29,7 @@ let
# Setup regular fileSystems machinery to ensure forceImportAll can be
# tested via the regular service units.
fileSystems = lib.mkVMOverride {
virtualisation.fileSystems = {
"/forcepool" = {
device = "forcepool";
fsType = "zfs";