Initial clean commit
This commit is contained in:
commit
1862821f8f
15 changed files with 1240 additions and 0 deletions
39
modules/services/podman.nix
Normal file
39
modules/services/podman.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
environment.etc."sops/age/keys.txt".source = ../../secrets/age/keys.txt;
|
||||
sops.defaultSopsFile = ../../secrets/bucur.yaml;
|
||||
sops.age.keyFile = "/etc/sops/age/keys.txt";
|
||||
|
||||
sops.secrets.mtproto_secret = {};
|
||||
|
||||
sops.templates."mtproto-proxy.env".content = ''
|
||||
SECRET=${config.sops.placeholder."mtproto_secret"}
|
||||
'';
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
portainer = {
|
||||
image = "docker.io/portainer/portainer-ce:lts";
|
||||
autoStart = true;
|
||||
ports = [
|
||||
"100.124.109.92:8000:8000"
|
||||
"100.124.109.92:9443:9443"
|
||||
];
|
||||
volumes = [
|
||||
"portainer_data:/data"
|
||||
"/run/podman/podman.sock:/var/run/docker.sock"
|
||||
];
|
||||
extraOptions = [ "--privileged" ];
|
||||
};
|
||||
|
||||
mtproto-proxy = {
|
||||
image = "docker.io/telegrammessenger/proxy:latest";
|
||||
autoStart = true;
|
||||
ports = [ "0.0.0.0:8443:443" ];
|
||||
volumes = [ "mtproxy-data:/data" ];
|
||||
environmentFiles = [ config.sops.templates."mtproto-proxy.env".path ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue