Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhh/flake-module-container
flake-module-container
https://github.com/jhh/flake-module-container
Last synced: 27 days ago
JSON representation
flake-module-container
- Host: GitHub
- URL: https://github.com/jhh/flake-module-container
- Owner: jhh
- Created: 2022-12-21T15:33:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T16:13:39.000Z (about 2 years ago)
- Last Synced: 2024-12-16T03:42:14.145Z (about 1 month ago)
- Language: Nix
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flake-module-container
Nix flake containing an example **hello**
[Flask](https://flask.palletsprojects.com/) web app that is deployed in a Nixos
container to test its module definition.## Running
Creating a NixOS container requires root.
```sh
$ sudo nixos-container create flake-test --flake .
# host IP is 10.233.1.1, container IP is 10.233.10.233$ sudo nixos-container start flake-test
$ sudo nixos-container root-login flake-test
# [root@nixos:~][root@nixos:~] systemctl status hello
# ● hello.service - Hello service
# ...[root@nixos:~] exit
$ curl http://flake-test:8000/hello
# {"data":"Hello World"}$ sudo nixos-container destroy flake-test
```See [Container Management](https://nixos.org/manual/nixos/stable/index.html#ch-containers) in the
NixOS manual.