School: add xampp
This commit is contained in:
parent
9b75124f16
commit
cafa6e4097
2 changed files with 30 additions and 0 deletions
29
roles/school/services/xampp.nix
Normal file
29
roles/school/services/xampp.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ 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;
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue