3 ms·
Can you generate a tar file that you can “just run“ (or something to that effect)? My impression was that Nix works more like a package installer, but determini
by rtpg 5y ago
Can you generate a tar file that you can “just run“ (or something to that effect)? My impression was that Nix works more like a package installer, but deterministic
- rekado 5y ago`guix pack` (with its various options) can produce an archive that you could run after unpacking anywhere.
- henrydark 5y agoThere might be quicker ways to do this, but with one extra line a derivation exports a docker image which can in turn be turned to a tar with one more line. Nix's image building is pretty neat. You can control how many layers you want, which I currently maximize so that docker pulls from AWS ECR are a lot faster
- mananaysiempre 5y agoWith the new (nominally experimental) CLI, use `nix bundle --bundler github:NixOS/bundlers#toArx` (or equivalently just `nix bundle`) to build a self-extracting shell script[1], `...#toDockerImage` to build a Docker image, etc.[2,3], though there’s no direct AppImage support that I can see (would be helpful to eliminate the startup overhead caused by self-extraction). If you want a QEMU VM for a complete system rather than a set of files for a single application, use `nixos-rebuild build-vm`, though that is intended more for testing than for deployment. The Docker bundler seems to be using more general Docker-compatible infrastructure in Nixpkgs[4]. [1] https://github.com/solidsnack/arx https://github.com/solidsnack/arx [2] https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-bundle.html https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni... [3] https://github.com/NixOS/bundlers https://github.com/NixOS/bundlers [4] https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTools https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTool...