mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
nextcloud: Remove module
This commit is contained in:
parent
74e09a3887
commit
d4ef1575ff
4 changed files with 0 additions and 140 deletions
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -192,19 +192,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nextcloud-twofactor-totp": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1665648151,
|
|
||||||
"narHash": "sha256-zAPNugbvngXcpgWJLD78YAg4G1QtGaphx1bhhg7mLKE=",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/nextcloud-releases/twofactor_totp/releases/download/v6.4.1/twofactor_totp-v6.4.1.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/nextcloud-releases/twofactor_totp/releases/download/v6.4.1/twofactor_totp-v6.4.1.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756750488,
|
"lastModified": 1756750488,
|
||||||
|
|
@ -293,7 +280,6 @@
|
||||||
"firefox-addons": "firefox-addons",
|
"firefox-addons": "firefox-addons",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nextcloud-twofactor-totp": "nextcloud-twofactor-totp",
|
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,6 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nextcloud-twofactor-totp = {
|
|
||||||
url = "https://github.com/nextcloud-releases/twofactor_totp/releases/download/v6.4.1/twofactor_totp-v6.4.1.tar.gz";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
radicale-birthday-calendar = {
|
radicale-birthday-calendar = {
|
||||||
url = "github:iBigQ/radicale-birthday-calendar";
|
url = "github:iBigQ/radicale-birthday-calendar";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.custom.services.nextcloud;
|
|
||||||
|
|
||||||
user = config.users.users.nextcloud.name;
|
|
||||||
dataDir = config.services.nextcloud.home;
|
|
||||||
|
|
||||||
nextcloud-occ = lib.getExe' config.services.nextcloud.occ "nextcloud-occ";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.custom.services.nextcloud.doBackups = lib.mkEnableOption "";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.doBackups {
|
|
||||||
custom.services.resticBackups.nextcloud = {
|
|
||||||
paths = [
|
|
||||||
"${dataDir}/data"
|
|
||||||
"${dataDir}/config/config.php"
|
|
||||||
"${dataDir}/db.dump"
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
backupPrepareCommand = ''
|
|
||||||
${nextcloud-occ} maintenance:mode --on
|
|
||||||
${lib.getExe pkgs.sudo} --user=${user} ${lib.getExe' config.services.postgresql.package "pg_dump"} nextcloud --format=custom --file=${dataDir}/db.dump
|
|
||||||
'';
|
|
||||||
backupCleanupCommand = "${nextcloud-occ} maintenance:mode --off";
|
|
||||||
};
|
|
||||||
|
|
||||||
restoreCommand = {
|
|
||||||
preRestore = "${nextcloud-occ} maintenance:mode --on";
|
|
||||||
postRestore = ''
|
|
||||||
sudo --user=${user} pg_restore --clean --if-exists --dbname nextcloud ${dataDir}/db.dump
|
|
||||||
${nextcloud-occ} maintenance:mode --off
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.custom.services.nextcloud;
|
|
||||||
|
|
||||||
user = config.users.users.nextcloud.name;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.custom.services.nextcloud = {
|
|
||||||
enable = lib.mkEnableOption "";
|
|
||||||
domain = lib.mkOption {
|
|
||||||
type = lib.types.nonEmptyStr;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
port = lib.mkOption {
|
|
||||||
type = lib.types.port;
|
|
||||||
default = 80;
|
|
||||||
readOnly = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
meta = {
|
|
||||||
domains.list = [ cfg.domain ];
|
|
||||||
ports = {
|
|
||||||
tcp.list = [ cfg.port ];
|
|
||||||
udp.list = [ config.services.postgresql.settings.port ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."nextcloud/admin-password".owner = user;
|
|
||||||
|
|
||||||
services.nextcloud = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.nextcloud31;
|
|
||||||
hostName = cfg.domain;
|
|
||||||
|
|
||||||
database.createLocally = true;
|
|
||||||
config = {
|
|
||||||
dbtype = "pgsql";
|
|
||||||
adminuser = "admin";
|
|
||||||
adminpassFile = config.sops.secrets."nextcloud/admin-password".path;
|
|
||||||
};
|
|
||||||
|
|
||||||
https = true;
|
|
||||||
settings = {
|
|
||||||
overwriteProtocol = "https";
|
|
||||||
trusted_proxies = [ "localhost" ];
|
|
||||||
log_type = "file";
|
|
||||||
default_phone_region = "DE";
|
|
||||||
maintenance_window_start = "2"; # UTC
|
|
||||||
};
|
|
||||||
|
|
||||||
configureRedis = true;
|
|
||||||
maxUploadSize = "16G";
|
|
||||||
phpOptions."opcache.interned_strings_buffer" = "16";
|
|
||||||
|
|
||||||
extraApps = {
|
|
||||||
inherit (config.services.nextcloud.package.packages.apps)
|
|
||||||
calendar
|
|
||||||
contacts
|
|
||||||
;
|
|
||||||
|
|
||||||
twofactor_totp = pkgs.fetchNextcloudApp {
|
|
||||||
url = inputs.nextcloud-twofactor-totp.outPath;
|
|
||||||
sha256 = inputs.nextcloud-twofactor-totp.narHash;
|
|
||||||
license = "agpl3Plus";
|
|
||||||
unpack = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue