diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-30 17:43:58 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-30 17:43:58 +0200 |
commit | 8118896a373993a488d5bc09f6049b176876529b (patch) | |
tree | a0d9d00bb4ae0c5b5683a51bfd6cc6b4d420aed5 | |
parent | Modules: git-server: Listen on ipv6 too (diff) | |
download | nixos-config-containers.tar.gz nixos-config-containers.tar.bz2 nixos-config-containers.zip |
Test containers containers
-rw-r--r-- | modules/git-server/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/git-server/default.nix b/modules/git-server/default.nix index 143bec3..3c481fe 100644 --- a/modules/git-server/default.nix +++ b/modules/git-server/default.nix @@ -11,6 +11,47 @@ in cgitPackage ]; + virtualisation.oci-containers.containers = { + hackagecompare = { + autoStart = true; + image = "redis:latest"; + imageFile = pkgs.dockerTools.buildImage { + name = "redis"; + tag = "latest"; + + #fromImage = someBaseImage; + fromImageName = null; + fromImageTag = "latest"; + + copyToRoot = pkgs.buildEnv { + name = "image-root"; + paths = [ pkgs.redis ]; + pathsToLink = [ "/bin" ]; + }; + + runAsRoot = '' + #!${pkgs.runtimeShell} + mkdir -p /data + ''; + + config = { + Cmd = [ "/bin/redis-server" ]; + WorkingDir = "/data"; + Volumes = { "/data" = { }; }; + }; + + diskSize = 1024; + buildVMMemorySize = 512; + }; + ports = [ "127.0.0.1:3010:80" ]; + volumes = [ + "/home/git:/git" + ]; + cmd = [ + ]; + }; + }; + services = { nginx = { enable = true; |