This commit is contained in:
cy 2024-12-17 00:55:28 -05:00
parent 86ae498aa4
commit dff837606b
2 changed files with 49 additions and 2 deletions

View file

@ -21,6 +21,7 @@
./wireguard.nix
./grafana.nix
./tor.nix
./ghost.nix
];
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
@ -126,7 +127,7 @@
users.users.yt = {
isNormalUser = true;
extraGroups = ["wheel" "networkmanager" "docker"];
extraGroups = ["wheel" "networkmanager" "podman"];
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux"];
shell = pkgs.zsh;
};
@ -170,5 +171,14 @@
logFormat = lib.mkForce "level INFO";
};
virtualisation.docker.enable = true;
# container stuff
virtualisation.container.enable = true;
vrtualisation.podman = {
enable = true;
# create 'docker' alias for podman, to use as
# drop-in replacement
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.oci-containers.backend = "podman";
}

37
hosts/chunk/ghost.nix Normal file
View file

@ -0,0 +1,37 @@
{...}: {
virtualisation.oci-containers.containers.ghost = {
imgage = "ghost:5-alpine";
autoStart = true;
ports = ["127.0.0.1:8084:2368"];
pull = "always";
environment = {
database__client = "mysql";
database__connection__host = "ghost-db";
database__connection__user = "root";
database__connection__password = "example";
database__connection__databse = "ghost";
url = "https://cything.io";
NODE_ENV = "production";
};
volumes = [
"/opt/ghost/data:/var/lib/ghost/content"
];
networks = [
"ghost-net"
];
};
virtualisation.oci-containers.containers.ghost-db = {
image = "mysql:8.0";
autoStart = true;
environment = {
MYSQL_ROOT_PASSWORD = "example";
};
volumes = [
"/opt/ghost/db:/var/lib/mysql"
];
networks = [
"ghost-net"
];
};
}