Wtf why did it remove everything.
This commit is contained in:
parent
d58b606d90
commit
2144d9ef61
73 changed files with 1077 additions and 0 deletions
10
modules/system/services/server/fileserver/default.nix
Normal file
10
modules/system/services/server/fileserver/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.fileserver.enable = lib.mkEnableOption "Enable file serving services";
|
||||
|
||||
imports = [
|
||||
./jellyfin
|
||||
./nextcloud
|
||||
./nfs
|
||||
];
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
|
||||
config = lib.mkIf config.system.fileserver.enable {
|
||||
services.jellyfin.enable = true;
|
||||
environment.persistence."/persist".directories = [ "/var/lib/jellyfin" ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."jelly.nixfox.ca" = lib.mkIf config.services.forgejo.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.collabora-online.enable = config.services.nextcloud.enable;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./collabora
|
||||
./nginx
|
||||
];
|
||||
|
||||
config = lib.mkIf config.system.fileserver.enable {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "cloud.nixfox.ca";
|
||||
https = true;
|
||||
config = {
|
||||
adminuser = config.sysusers.main;
|
||||
adminpassFile = "${pkgs.writeText "initial" config.secrets.initialPass}";
|
||||
};
|
||||
settings = {
|
||||
trusted_proxies = [ "127.0.0.1" ];
|
||||
trusted_domains = [ "cloud.nixfox.ca" ];
|
||||
overwriteprotocol = "https";
|
||||
mail_smtphost = "mx.nixfox.ca";
|
||||
mail_domain = "nixfox.ca";
|
||||
mail_from_address = "noreply";
|
||||
mail_smtpauth = "true";
|
||||
mail_smtpname = "noreply@nixfox.ca";
|
||||
mail_smtppassword = config.secrets.noreplyPassword;
|
||||
mail_smtpmode = "smtp";
|
||||
mail_smtpport = 587;
|
||||
};
|
||||
};
|
||||
environment.persistence."/persist".directories = [ "/var/lib/nextcloud" ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."cloud.nixfox.ca" = lib.mkIf config.services.nextcloud.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
location /.well-known/carddav {
|
||||
return 301 $scheme://$host/remote.php/dav;
|
||||
}
|
||||
location /.well-known/caldav {
|
||||
return 301 $scheme://$host/remote.php/dav;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
11
modules/system/services/server/fileserver/nfs/default.nix
Normal file
11
modules/system/services/server/fileserver/nfs/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nfs.server = {
|
||||
enable = config.system.fileserver.enable;
|
||||
exports = ''
|
||||
/export/KittyNFS/Files *(rw,sync,no_subtree_check)
|
||||
/export/KittyNFS/Media *(rw,sync,no_subtree_check)
|
||||
/export/KittyNFS/Music *(rw,sync,no_subtree_check)
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue