digital-ocean: make it easier to use disko

If the user provides a `fileSystems."/".device` option, it should have
higher precedence than the default value.
Same for `loader.grub.devices` (also set by disko internally).
This commit is contained in:
Jörg Thalheim 2024-03-21 08:05:23 +01:00
parent 20f77aa099
commit d87c4e1a72
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ with lib;
hostName = config.networking.hostName;
doMetadataFile = "/run/do-metadata/v1.json";
in mkMerge [{
fileSystems."/" = {
fileSystems."/" = lib.mkDefault {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
@ -41,8 +41,8 @@ with lib;
kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ];
initrd.kernelModules = [ "virtio_scsi" ];
kernelModules = [ "virtio_pci" "virtio_net" ];
loader = {
grub.device = "/dev/vda";
loader.grub = {
devices = lib.mkDefault ["/dev/vda"];
timeout = 0;
grub.configurationLimit = 0;
};