Compare commits

...

2 commits

Author SHA1 Message Date
eef20d52d5 DRAFT: onlyoffice docserver in nixos container 2023-10-20 23:20:24 +02:00
2971d1bbc0 fix nixpkgs.allowUnfree
the previous config had no effect, but nobody noticed since it was not
necessary in the first place.
2023-10-20 23:19:55 +02:00
4 changed files with 54 additions and 3 deletions

View file

@ -46,6 +46,7 @@
pkgs = import ./pkgs {
sources = inputs;
system = "x86_64-linux";
config.allowUnfree = true;
};
evalConfig = config: (nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@ -54,7 +55,6 @@
nix-hexchen.nixosModules.network.nftables
{
nixpkgs.pkgs = pkgs.lib.mkForce pkgs;
nixpkgs.config.allowUnfree = true;
imports = [ profiles.container profiles.nopersist ];
}
];

View file

@ -20,6 +20,7 @@
../../services/nginx-pages.nix
../../services/vaultwarden.nix
../../services/tracktrain.nix
../../services/onlyoffice.nix
../../services/uffd.nix
./lxc.nix

View file

@ -19,8 +19,6 @@
hexchen.bindmounts."/var/lib/gitea" = "/persist/gitea";
nixpkgs.config.allowUnfree = true;
services.gitea = {
enable = true;
appName = "0x0: git for all creatures";

52
services/onlyoffice.nix Normal file
View file

@ -0,0 +1,52 @@
{ config, lib, pkgs, evalConfig, ... }:
{
containers.onlyoffice = {
privateNetwork = true;
hostAddress = "192.168.142.1";
localAddress = "192.168.142.10";
autoStart = true;
bindMounts = {
"/persist" = {
hostPath = "/persist/containers/onlyoffice";
isReadOnly = false;
};
};
extraFlags = [ "--system-call-filter=proc_create_mount_point" ];
path = evalConfig ({ config, lib, pkgs, ... }: {
system.stateVersion = "21.11";
services.postgresql = {
enable = true;
ensureDatabases = [ "onlyoffice" ];
ensureUsers = [ {
name = "onlyoffice";
ensurePermissions = {
"DATABASE onlyoffice" = "ALL PRIVILEGES";
};
} ];
authentication = ''
local all all trust
'';
};
services.rabbitmq = {
enable = true;
dataDir = "/persist/rabbitmq";
};
services.onlyoffice = {
enable = true;
};
networking.firewall.allowedTCPPorts = [ 8000 ];
});
};
services.nginx.virtualHosts."onlyoffice-staging.infra4future.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://${config.containers.onlyoffice.localAddress}:8000";
};
}