mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
chore: cleaned up some stuff for the site
This commit is contained in:
parent
38f7ba4d91
commit
3a9339aead
5 changed files with 12 additions and 34 deletions
|
|
@ -29,7 +29,6 @@ in
|
|||
stateDir = "/var/lib/${serviceCfg.name}";
|
||||
environmentFile = "/run/secrets/env";
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -38,13 +37,11 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22 # SSH
|
||||
587 # SMTP
|
||||
serviceCfg.ports.port0
|
||||
];
|
||||
|
||||
systemd = {
|
||||
services = {
|
||||
systemd-networkd.wantedBy = [ "multi-user.target" ];
|
||||
|
|
@ -58,20 +55,16 @@ in
|
|||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "fix-perms" ''
|
||||
echo "Starting permission fix..."
|
||||
|
||||
OPENCLOUD_UID=$(id -u opencloud)
|
||||
echo "OpenCloud UID: $OPENCLOUD_UID"
|
||||
|
||||
find /var/lib/opencloud/storage/users -type f ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r file; do
|
||||
echo "Fixing file: $file"
|
||||
chown opencloud:opencloud "$file" 2>/dev/null || true
|
||||
done
|
||||
|
||||
find /var/lib/opencloud/storage/users -type d ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r dir; do
|
||||
echo "Fixing dir: $dir"
|
||||
chown opencloud:opencloud "$dir" 2>/dev/null || true
|
||||
done
|
||||
|
||||
echo "Permission fix complete"
|
||||
'';
|
||||
User = "root";
|
||||
|
|
@ -111,9 +104,7 @@ in
|
|||
"d ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
"z /etc/opencloud 0700 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
microvm = {
|
||||
vcpu = 1;
|
||||
mem = 1024 * 1;
|
||||
|
|
@ -173,7 +164,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${serviceCfg.mntPaths.path0} 0751 microvm wheel - -"
|
||||
|
|
@ -181,12 +171,10 @@ in
|
|||
"d ${serviceCfg.mntPaths.path0}/config 0751 microvm wheel - -"
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"${serviceCfg.name}/env" = {
|
||||
owner = "root";
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue