-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/proxmox-image: add additionalSpace, bootSize and diskSize options #238735
Conversation
Thanks! I will test this change tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works. Just have one small style suggestion.
@@ -234,6 +253,8 @@ with lib; | |||
mkdir -p $out/nix-support | |||
echo "file vma $out/vzdump-qemu-${cfg.filenameSuffix}.vma.zst" >> $out/nix-support/hydra-build-products | |||
''; | |||
bootSize = cfg.qemuConf.bootSize; | |||
diskSize = cfg.qemuConf.diskSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diskSize = cfg.qemuConf.diskSize; | |
inherit (cfg.qemuConf) diskSize bootSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great!
Didn't know this would be possible!
What do you think about also adding additionalSpace
?
I just realised I could add this option as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that would be useful to have too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that would be useful to have too.
- added it as well
- forced pushed the changes with better fitting commit message
- changed name of PR
- tested the
additionalSpace
option -> worked just fine
41abc6b
to
354fc65
Compare
354fc65
to
d7f89bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Description of changes
Since
make-disk-image.nix
has options to define the size of the EFI partition as well as the size of the whole disk, I think we should also add those options toproxmox-image
. This makes it possible, to generate a disk image which already has the wanted size without expanding it afterwards. Since the additional space isn't used, the image size shouldn't increase (compression is being used).nixpkgs/nixos/lib/make-disk-image.nix
Lines 89 to 103 in 030ba16
I used the same defaults as
make-disk-image.nix
.In case any additional changes to my PR are wanted - feel free to tell me!
I'm more than happy to discuss the specific implementation.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)