mirror of https://github.com/voidlizard/hbs2
test nix container for a hbs2-peer
This commit is contained in:
parent
4ab83f0517
commit
d437d67133
|
@ -112,11 +112,11 @@
|
|||
"saltine": "saltine"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1675594702,
|
||||
"narHash": "sha256-2kxcZZx31qAwDpbB45bFcIPwO5SWx1VtlHZnmKxZPdc=",
|
||||
"lastModified": 1675599025,
|
||||
"narHash": "sha256-ZVOkBwFMpUHyhsdBg8ubv/h43N7phoLqR1lYbgZEeH0=",
|
||||
"owner": "voidlizard",
|
||||
"repo": "hbs2",
|
||||
"rev": "0a194b2e7c50f79712b11315383c8b510ae41fc8",
|
||||
"rev": "4ab83f0517c0ab465634a15607d3f0dddeaba3e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -44,7 +44,9 @@
|
|||
networking.firewall.enable = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.hbs2.packages.${pkgs.system}.hbs2-peer
|
||||
inputs.hbs2.packages.${pkgs.system}.default
|
||||
screen
|
||||
tshark
|
||||
];
|
||||
|
||||
# modules = [
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
## Usage via `nix run`
|
||||
|
||||
# Create container defined by ./flake.nix
|
||||
nix run . -- create
|
||||
# The arguments after `--` are passed to the `extra-container` binary in PATH,
|
||||
# while the flake is used for the container definitions.
|
||||
|
||||
# Destroy container
|
||||
nix run . -- destroy
|
||||
|
||||
# Start an interactive shell in the container
|
||||
nix run . -- shell
|
||||
nix run . # equivalent, because `shell` is used as the default command
|
||||
|
||||
# Run a single command in the container.
|
||||
# The container is destroyed afterwards.
|
||||
nix run . -- --run c hostname
|
||||
nix run . -- shell --run c hostname # equivalent
|
||||
nix run . -- --run bash -c 'curl --http0.9 $ip:50'
|
||||
|
||||
|
||||
## Usage via `nix build`
|
||||
# 1. Build container
|
||||
nix build . --out-link /tmp/container
|
||||
# 2. Run container
|
||||
extra-container shell /tmp/container
|
||||
|
||||
|
||||
## Inspect container configs
|
||||
nix eval . --apply 'sys: sys.containers.demo.config.networking.hostName'
|
Loading…
Reference in New Issue