fix: remove unnecessary sudo rules and adjust permissions for container directories

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Jakub Dorfman 2026-04-28 23:09:25 +02:00
parent fe4d3f4432
commit eeab4c1818
3 changed files with 4 additions and 20 deletions

View file

@ -41,18 +41,6 @@
]; ];
security.sudo.wheelNeedsPassword = true; security.sudo.wheelNeedsPassword = true;
security.sudo.extraRules = [
{
users = [ "reudy" ];
commands = [
{
command = "/run/current-system/sw/bin/systemctl reload caddy";
options = [ "NOPASSWD" ];
}
];
}
];
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -11,14 +11,14 @@
users.users.caddy.extraGroups = [ "panelroutes" ]; users.users.caddy.extraGroups = [ "panelroutes" ];
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/containers 0755 reudy panelroutes -" "d /var/lib/containers 0750 reudy panelroutes -"
"d /var/lib/containers/stacks 0750 reudy panelroutes -" "d /var/lib/containers/stacks 0750 reudy panelroutes -"
"d /var/lib/containers/volumes 0750 reudy panelroutes -" "d /var/lib/containers/volumes 0750 reudy panelroutes -"
"d /var/lib/containers/routes 0755 reudy panelroutes -" "d /var/lib/containers/routes 0750 reudy panelroutes -"
"d /var/lib/containers/state 0750 reudy panelroutes -" "d /var/lib/containers/state 0750 reudy panelroutes -"
"d /var/lib/containers/state/apps 0750 reudy panelroutes -" "d /var/lib/containers/state/apps 0750 reudy panelroutes -"
"d /var/lib/containers/backups 0750 reudy panelroutes -" "d /var/lib/containers/backups 0750 reudy panelroutes -"
"f /var/lib/containers/routes/routes.caddy 0664 reudy panelroutes -" "f /var/lib/containers/routes/routes.caddy 0640 reudy panelroutes -"
]; ];
systemd.services.panel-api = { systemd.services.panel-api = {
@ -29,7 +29,6 @@
pkgs.podman pkgs.podman
pkgs.podman-compose pkgs.podman-compose
pkgs.curl pkgs.curl
pkgs.sudo
pkgs.coreutils pkgs.coreutils
pkgs.zip pkgs.zip
pkgs.unzip pkgs.unzip
@ -41,7 +40,7 @@
Group = "panelroutes"; Group = "panelroutes";
Restart = "always"; Restart = "always";
RestartSec = 3; RestartSec = 3;
WorkingDirectory = "/home/reudy"; WorkingDirectory = "/var/lib/containers";
ExecStart = "${pkgs.python3}/bin/python3 ${./panel/panel-api.py}"; ExecStart = "${pkgs.python3}/bin/python3 ${./panel/panel-api.py}";
}; };

View file

@ -69,9 +69,6 @@ panelctl remove whoami --keep-volumes
# Remove app and all data # Remove app and all data
panelctl remove whoami panelctl remove whoami
# If deploy says caddy reload needs root:
sudo systemctl reload caddy
``` ```
## Notes ## Notes