about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-30 17:43:58 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-30 17:43:58 +0200
commit8118896a373993a488d5bc09f6049b176876529b (patch)
treea0d9d00bb4ae0c5b5683a51bfd6cc6b4d420aed5
parentModules: git-server: Listen on ipv6 too (diff)
downloadnixos-config-containers.tar.gz
nixos-config-containers.tar.bz2
nixos-config-containers.zip
Test containers containers
-rw-r--r--modules/git-server/default.nix41
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;