-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many formats generate an image only large enough for the generated NixOS config. This quickly runs out of space for NixOS servers that are updated over time rather than being redeployed with fresh images. Signed-off-by: James Alseth <james@jalseth.me>
- Loading branch information
Showing
10 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
{modulesPath, ...}: { | ||
{ | ||
modulesPath, | ||
specialArgs, | ||
lib, | ||
... | ||
}: { | ||
imports = [ | ||
"${toString modulesPath}/virtualisation/hyperv-image.nix" | ||
]; | ||
|
||
hyperv.baseImageSize = | ||
if builtins.hasAttr "diskSize" specialArgs == false then "auto" | ||
else if specialArgs.diskSize == "auto" then "auto" | ||
else lib.strings.toIntBase10 specialArgs.diskSize; | ||
|
||
formatAttr = "hypervImage"; | ||
fileExtension = ".vhdx"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
{modulesPath, ...}: { | ||
{ | ||
modulesPath, | ||
specialArgs, | ||
... | ||
}: { | ||
imports = [ | ||
"${toString modulesPath}/virtualisation/proxmox-image.nix" | ||
]; | ||
|
||
proxmox.qemuConf.diskSize = specialArgs.diskSize or "auto"; | ||
|
||
formatAttr = "VMA"; | ||
fileExtension = ".vma.zst"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
{modulesPath, ...}: { | ||
{ | ||
modulesPath, | ||
specialArgs, | ||
lib, | ||
... | ||
}: { | ||
imports = [ | ||
"${toString modulesPath}/virtualisation/qemu-vm.nix" | ||
]; | ||
virtualisation.diskSize = | ||
if builtins.hasAttr "diskSize" specialArgs == false then null | ||
else if specialArgs.diskSize == "auto" then null | ||
else lib.strings.toIntBase10 specialArgs.diskSize; | ||
|
||
formatAttr = "vm"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
{modulesPath, ...}: { | ||
{ | ||
modulesPath, | ||
specialArgs, | ||
lib, | ||
... | ||
}: { | ||
imports = [ | ||
"${toString modulesPath}/virtualisation/vmware-image.nix" | ||
]; | ||
|
||
vmware.baseImageSize = | ||
if builtins.hasAttr "diskSize" specialArgs == false then "auto" | ||
else if specialArgs.diskSize == "auto" then "auto" | ||
else lib.strings.toIntBase10 specialArgs.diskSize; | ||
|
||
formatAttr = "vmwareImage"; | ||
fileExtension = ".vmdk"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters