Skip to content
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

VM: NixOS, with Mycelium #200

Open
Tracked by #261
xmonader opened this issue Jan 17, 2024 · 2 comments
Open
Tracked by #261

VM: NixOS, with Mycelium #200

xmonader opened this issue Jan 17, 2024 · 2 comments

Comments

@xmonader
Copy link
Collaborator

No description provided.

@xmonader
Copy link
Collaborator Author

please sync with @ashraffouda

@xmonader xmonader changed the title VM: NixOS, with Mycelium and way how to see Mycelium addr in UI (Portal) VM: NixOS, with Mycelium Mar 26, 2024
@PeterNashaat PeterNashaat self-assigned this May 9, 2024
@PeterNashaat
Copy link
Member

root@imagecreator:~#:/mnt/holochain-infra/modules/flake-parts# cat zos-vm-build.nix
{ pkgs ? import <nixpkgs> {} }:

pkgs.writeShellApplication {
  name = "zos-vm-build";
  text = ''
    set -xueE -o pipefail

    # Use escaped double quotes inside the shell command

    resultName="tfgrid-base.peter"

    mkdir -p results

    # Make sure to escape the inner quotes correctly
    nix build --out-link results/"$resultName" \
      .#nixosConfigurations."tfgrid-base".config.system.build.zosVmDir
    ln -sf --no-target-directory "$resultName" results/"tfgrid-base.latest"

    echo results/"$resultName"
  '';
}
  • Had issue
error: attribute 'zos-vm-build' in selection path 'zos-vm-build' not found

error: syntax error, unexpected ':', expecting '}'
       at /mnt/holochain-infra/modules/flake-parts/zos-vm-build.nix:8:12:

  • Using command to build the image
nix-build packages.zos-utils.nix -A zos-vm-build
  • Result after running build command
lrwxrwxrwx  1 root root   56 Apr 16 07:44 result -> /nix/store/ma932v2n629pp1qpdlh0xnhnxblk52ja-zos-vm-build
-rw-r--r--  1 root root  385 Apr 16 07:02 speicalArgs.nix
drwxr-xr-x  2 root root 4096 Apr 16 07:54 tfgrid-microvm
-rw-r--r--  1 root root  531 Apr 16 07:44 zos-vm-build.nix
root@imagecreator:~#/mnt/holochain-infra/modules/flake-parts# ls -la /nix/store/ma932v2n629pp1qpdlh0xnhnxblk52ja-zos-vm-build
total 160
dr-xr-xr-x   3 root root     4096 Jan  1  1970 .
drwxrwxr-t 121 root nixbld 151552 Apr 16 07:44 ..
dr-xr-xr-x   3 root root     4096 Apr 16 07:45 bin
root@imagecreator:~#/mnt/holochain-infra/modules/flake-parts# ls -la /nix/store/ma932v2n629pp1qpdlh0xnhnxblk52ja-zos-vm-build/bin/
total 16
dr-xr-xr-x 3 root root 4096 Apr 16 07:45 .
dr-xr-xr-x 3 root root 4096 Jan  1  1970 ..
drwxr-xr-x 2 root root 4096 Apr 16 07:45 results
-r-xr-xr-x 1 root root  503 Jan  1  1970 zos-vm-build
root@imagecreator:~#/mnt/holochain-infra/modules/flake-parts# ls -la /nix/store/ma932v2n629pp1qpdlh0xnhnxblk52ja-zos-vm-build/bin/zos-vm-build
-r-xr-xr-x 1 root root 503 Jan  1  1970 /nix/store/ma932v2n629pp1qpdlh0xnhnxblk52ja-zos-vm-build/bin/zos-vm-build
  • Getting this error when running the newly created bin
./zos-vm-build
+ resultName=tfgrid-base.peter
+ mkdir -p results
+ nix build --out-link results/tfgrid-base.peter .#nixosConfigurations.tfgrid-base.config.system.build.zosVmDir
error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it
  • blocked on creating nixos image

@xmonader xmonader modified the milestone: 3.15.x Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants