mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
fmt
This commit is contained in:
parent
f10aa8308e
commit
d6a15f13a3
1 changed files with 14 additions and 14 deletions
|
|
@ -4,30 +4,30 @@
|
|||
incus-image-vm-import.program = pkgs.writeShellApplication {
|
||||
name = "incus-image-vm-import";
|
||||
text = ''
|
||||
NAME=$1
|
||||
NAME=$1
|
||||
|
||||
echo "Building image ... "
|
||||
METADATA=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.metadata)/tarball/
|
||||
IMG=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.qemuImage)/nixos.qcow2
|
||||
echo "Building image ... "
|
||||
METADATA=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.metadata)/tarball/
|
||||
IMG=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.qemuImage)/nixos.qcow2
|
||||
|
||||
echo "Importing ... "
|
||||
set -x
|
||||
sudo incus image import --alias srid/"$NAME" "$METADATA"/*.tar.xz "$IMG"
|
||||
echo "Importing ... "
|
||||
set -x
|
||||
sudo incus image import --alias srid/"$NAME" "$METADATA"/*.tar.xz "$IMG"
|
||||
'';
|
||||
};
|
||||
|
||||
incus-image-container-import.program = pkgs.writeShellApplication {
|
||||
name = "incus-image-container-import";
|
||||
text = ''
|
||||
NAME=$1
|
||||
NAME=$1
|
||||
|
||||
echo "Building image ... "
|
||||
METADATA=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.metadata)/tarball/
|
||||
IMG=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.squashfs)/nixos-lxc-image-${system}.squashfs
|
||||
echo "Building image ... "
|
||||
METADATA=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.metadata)/tarball/
|
||||
IMG=$(nix build --no-link --print-out-paths ${inputs.self}#nixosConfigurations."$NAME".config.system.build.squashfs)/nixos-lxc-image-${system}.squashfs
|
||||
|
||||
echo "Importing ... "
|
||||
set -x
|
||||
sudo incus image import --alias srid/"$NAME" "$METADATA"/*.tar.xz "$IMG"
|
||||
echo "Importing ... "
|
||||
set -x
|
||||
sudo incus image import --alias srid/"$NAME" "$METADATA"/*.tar.xz "$IMG"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue