questionable changes. revert.
This commit is contained in:
parent
41a3559b85
commit
ecf8ac8c5d
2 changed files with 72 additions and 3 deletions
12
flake.nix
12
flake.nix
|
@ -3,9 +3,13 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nextcloud29 = {
|
||||
url = "github:nix-unstable/nextcloud";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
outputs = { self, nixpkgs, nextcloud29, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
lib = nixpkgs.lib;
|
||||
|
@ -17,5 +21,11 @@
|
|||
modules = [ ./nixos/configuration.nix ];
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
nix = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ ./nextcloud/nextcloud.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,64 @@
|
|||
{ pkgs, ... }:
|
||||
{ self, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
services = {
|
||||
nginx.virtualHosts = {
|
||||
"cloud.ryot.foo" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
|
||||
"office.ryot.foo" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
hostName = "cloud.ryot.foo";
|
||||
|
||||
# Need to manually increment with every major upgrade.
|
||||
package = pkgs.nextcloud27;
|
||||
|
||||
# Let NixOS install and configure the database automatically.
|
||||
database.createLocally = true;
|
||||
|
||||
# Let NixOS install and configure Redis caching automatically.
|
||||
configureRedis = true;
|
||||
|
||||
# Increase the maximum file upload size to avoid problems uploading videos.
|
||||
maxUploadSize = "16G";
|
||||
https = true;
|
||||
enableBrokenCiphersForSSE = false;
|
||||
|
||||
autoUpdateApps.enable = true;
|
||||
extraAppsEnable = true;
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
# List of apps we want to install and are already packaged in
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
|
||||
inherit calendar contacts mail notes onlyoffice tasks;
|
||||
|
||||
# Custom app installation example.
|
||||
cookbook = pkgs.fetchNextcloudApp rec {
|
||||
url =
|
||||
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
|
||||
sha256 = "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
overwriteProtocol = "https";
|
||||
defaultPhoneRegion = "PT";
|
||||
dbtype = "pgsql";
|
||||
adminuser = "admin";
|
||||
adminpassFile = "/path/to/nextcloud-admin-pass";
|
||||
};
|
||||
};
|
||||
|
||||
onlyoffice = {
|
||||
enable = true;
|
||||
hostname = "onlyoffice.example.com";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue