Revert "Use mkImageMediaOverride for filesystem attributes of various images"

illustris 5803bdb9 81229d11

+1 -1
nixos/modules/installer/sd-card/sd-image.nix
···
config = {
hardware.enableAllHardware = true;
-
fileSystems = lib.mkImageMediaOverride {
+
fileSystems = {
"/boot/firmware" = {
device = "/dev/disk/by-label/${config.sdImage.firmwarePartitionName}";
fsType = "vfat";
+1 -1
nixos/modules/virtualisation/azure-image.nix
···
'';
};
-
fileSystems = lib.mkImageMediaOverride {
+
fileSystems = {
"/" = {
device = "/dev/disk/by-label/${cfg.label}";
inherit (cfg) label;
+1 -1
nixos/modules/virtualisation/digital-ocean-config.nix
···
in
mkMerge [
{
-
fileSystems."/" = lib.mkImageMediaOverride {
+
fileSystems."/" = lib.mkDefault {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
+1 -1
nixos/modules/virtualisation/disk-image.nix
···
boot.loader.systemd-boot.enable = lib.mkDefault cfg.efiSupport;
boot.growPartition = lib.mkDefault true;
-
fileSystems = lib.mkImageMediaOverride {
+
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
+1 -1
nixos/modules/virtualisation/google-compute-config.nix
···
../profiles/qemu-guest.nix
];
-
fileSystems."/" = lib.mkImageMediaOverride {
+
fileSystems."/" = {
fsType = "ext4";
device = "/dev/disk/by-label/nixos";
autoResize = true;
+8 -10
nixos/modules/virtualisation/hyperv-image.nix
···
inherit config lib pkgs;
};
-
fileSystems = lib.mkImageMediaOverride {
-
"/" = {
-
device = "/dev/disk/by-label/nixos";
-
autoResize = true;
-
fsType = "ext4";
-
};
+
fileSystems."/" = {
+
device = "/dev/disk/by-label/nixos";
+
autoResize = true;
+
fsType = "ext4";
+
};
-
"/boot" = {
-
device = "/dev/disk/by-label/ESP";
-
fsType = "vfat";
-
};
+
fileSystems."/boot" = {
+
device = "/dev/disk/by-label/ESP";
+
fsType = "vfat";
};
boot.growPartition = true;
+1 -1
nixos/modules/virtualisation/kubevirt.nix
···
];
config = {
-
fileSystems."/" = lib.mkImageMediaOverride {
+
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
+5 -3
nixos/modules/virtualisation/linode-config.nix
···
{
+
config,
lib,
pkgs,
...
}:
+
with lib;
{
imports = [ ../profiles/qemu-guest.nix ];
···
enable = true;
settings.PermitRootLogin = "prohibit-password";
-
settings.PasswordAuthentication = lib.mkDefault false;
+
settings.PasswordAuthentication = mkDefault false;
};
networking = {
···
sysstat
];
-
fileSystems."/" = lib.mkImageMediaOverride {
+
fileSystems."/" = {
fsType = "ext4";
device = "/dev/sda";
autoResize = true;
};
-
swapDevices = lib.mkDefault [ { device = "/dev/sdb"; } ];
+
swapDevices = mkDefault [ { device = "/dev/sdb"; } ];
# Enable LISH and Linode Booting w/ GRUB
boot = {
+8 -10
nixos/modules/virtualisation/oci-common.nix
···
boot.growPartition = true;
-
fileSystems = lib.mkImageMediaOverride {
-
"/" = {
-
device = "/dev/disk/by-label/nixos";
-
fsType = "ext4";
-
autoResize = true;
-
};
+
fileSystems."/" = {
+
device = "/dev/disk/by-label/nixos";
+
fsType = "ext4";
+
autoResize = true;
+
};
-
"/boot" = lib.mkIf cfg.efi {
-
device = "/dev/disk/by-label/ESP";
-
fsType = "vfat";
-
};
+
fileSystems."/boot" = lib.mkIf cfg.efi {
+
device = "/dev/disk/by-label/ESP";
+
fsType = "vfat";
};
boot.loader.efi.canTouchEfiVariables = false;
+11 -15
nixos/modules/virtualisation/openstack-config.nix
···
];
config = {
-
fileSystems."/" = mkIf (!cfg.zfs.enable) (
-
lib.mkImageMediaOverride {
-
device = "/dev/disk/by-label/nixos";
-
fsType = "ext4";
-
autoResize = true;
-
}
-
);
+
fileSystems."/" = mkIf (!cfg.zfs.enable) {
+
device = "/dev/disk/by-label/nixos";
+
fsType = "ext4";
+
autoResize = true;
+
};
-
fileSystems."/boot" = mkIf (cfg.efi || cfg.zfs.enable) (
-
lib.mkImageMediaOverride {
-
# The ZFS image uses a partition labeled ESP whether or not we're
-
# booting with EFI.
-
device = "/dev/disk/by-label/ESP";
-
fsType = "vfat";
-
}
-
);
+
fileSystems."/boot" = mkIf (cfg.efi || cfg.zfs.enable) {
+
# The ZFS image uses a partition labeled ESP whether or not we're
+
# booting with EFI.
+
device = "/dev/disk/by-label/ESP";
+
fsType = "vfat";
+
};
boot.growPartition = true;
boot.kernelParams = [ "console=tty1" ];
+7 -9
nixos/modules/virtualisation/openstack-options.nix
···
_: value: ((value.mount or null) != null)
) config.openstack.zfs.datasets;
in
-
lib.mkImageMediaOverride (
-
lib.mapAttrs' (
-
dataset: opts:
-
lib.nameValuePair opts.mount {
-
device = dataset;
-
fsType = "zfs";
-
}
-
) mountable
-
);
+
lib.mapAttrs' (
+
dataset: opts:
+
lib.nameValuePair opts.mount {
+
device = dataset;
+
fsType = "zfs";
+
}
+
) mountable;
};
}
+9 -17
nixos/modules/virtualisation/proxmox-image.nix
···
''
${vma}/bin/vma create "${config.image.baseName}.vma" \
-c ${
-
cfgFile "qemu-server.conf" (
-
(builtins.removeAttrs cfg.qemuConf [ "diskSize" ])
-
// {
-
inherit (config.virtualisation) diskSize;
-
}
-
// cfg.qemuExtraConf
-
)
+
cfgFile "qemu-server.conf" (cfg.qemuConf // cfg.qemuExtraConf)
}/qemu-server.conf drive-virtio0=$diskImage
rm $diskImage
${pkgs.zstd}/bin/zstd "${config.image.baseName}.vma"
···
];
};
-
fileSystems = lib.mkImageMediaOverride {
-
"/" = {
-
device = "/dev/disk/by-label/nixos";
-
autoResize = true;
-
fsType = "ext4";
-
};
-
"/boot" = lib.mkIf hasBootPartition {
-
device = "/dev/disk/by-label/ESP";
-
fsType = "vfat";
-
};
+
fileSystems."/" = {
+
device = "/dev/disk/by-label/nixos";
+
autoResize = true;
+
fsType = "ext4";
+
};
+
fileSystems."/boot" = lib.mkIf hasBootPartition {
+
device = "/dev/disk/by-label/ESP";
+
fsType = "vfat";
};
networking = mkIf cfg.cloudInit.enable {
+1 -1
nixos/modules/virtualisation/virtualbox-image.nix
···
};
fileSystems =
-
lib.mkImageMediaOverride {
+
{
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
+8 -10
nixos/modules/virtualisation/vmware-image.nix
···
inherit config lib pkgs;
};
-
fileSystems = lib.mkImageMediaOverride {
-
"/" = {
-
device = "/dev/disk/by-label/nixos";
-
autoResize = true;
-
fsType = "ext4";
-
};
+
fileSystems."/" = {
+
device = "/dev/disk/by-label/nixos";
+
autoResize = true;
+
fsType = "ext4";
+
};
-
"/boot" = {
-
device = "/dev/disk/by-label/ESP";
-
fsType = "vfat";
-
};
+
fileSystems."/boot" = {
+
device = "/dev/disk/by-label/ESP";
+
fsType = "vfat";
};
boot.growPartition = true;