forked from c3d2/nix-config
Merge pull request 'add next-cloud' (#69) from leon/nix-config:vps-leon into master
Reviewed-on: c3d2/nix-config#69
This commit is contained in:
commit
d5626ebc4c
|
@ -77,6 +77,40 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
#------------------End----------------------------
|
||||
|
||||
#------------------next-cloud---------------------
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
hostName = "next-cloud";
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
dbname = "nextcloud";
|
||||
adminpassFile = "/etc/nixos/next-cloud/pass";
|
||||
adminuser = "root";
|
||||
extraTrustedDomains = [ "172.20.79.254" "10.10.11.4" ];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{ name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# ensure that postgres is running *before* running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
after = ["postgresql.service"];
|
||||
};
|
||||
|
||||
#------------------End----------------------------
|
||||
system.stateVersion = "22.05";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user