29 lines
No EOL
674 B
Nix
29 lines
No EOL
674 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
# 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"
|
|
];
|
|
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;
|
|
}
|
|
})
|
|
'';
|
|
} |