38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
booDark = pkgs.fetchzip {
|
|
url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip";
|
|
hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo=";
|
|
};
|
|
in {
|
|
# I tried setting up httpd + php in class but I just gave up
|
|
virtualisation.oci-containers = {
|
|
containers."xampp" = {
|
|
autoStart = false;
|
|
image = "tomsik68/xampp";
|
|
#user = "${toString users.users.atfc.uid}:${toString users.groups.minecraft.gid}";
|
|
volumes = [
|
|
"xampp-mysql:/opt/lampp/var/mysql"
|
|
# No dark mode installed by default :(
|
|
"${booDark}:/opt/lampp/phpmyadmin/themes/booDark"
|
|
];
|
|
ports = ["41061:22" "41062:80"];
|
|
};
|
|
};
|
|
|
|
security.polkit.extraConfig = ''
|
|
polkit.addRule(function(action, subject) {
|
|
if (
|
|
action.id == "org.freedesktop.systemd1.manage-units" &&
|
|
action.lookup("unit") == "podman-xampp.service" &&
|
|
subject.user == "toast"
|
|
)
|
|
{
|
|
return polkit.Result.YES;
|
|
}
|
|
})
|
|
'';
|
|
}
|