mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Add basic nextcloud module
This commit is contained in:
parent
d97a299ea3
commit
3cf12e8aa6
3 changed files with 35 additions and 2 deletions
30
modules/system/nextcloud.nix
Normal file
30
modules/system/nextcloud.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myConfig.nextcloud.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.nextcloud.enable {
|
||||
sops.secrets.nextcloud-admin-pass = {
|
||||
owner = config.services.nextcloud.config.dbname;
|
||||
group = config.services.nextcloud.config.dbuser;
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud29;
|
||||
home = "/data/nextcloud";
|
||||
hostName = config.networking.fqdn;
|
||||
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
adminuser = "admin";
|
||||
adminpassFile = config.sops.secrets.nextcloud-admin-pass.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue