mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(makanek): host codimd, nextcloud
This commit is contained in:
25
configs/codimd.nix
Normal file
25
configs/codimd.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
services.nginx.virtualHosts."pad.xn--kiern-0qa.de" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/".extraConfig = ''
|
||||
client_max_body_size 4G;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:3091;
|
||||
'';
|
||||
};
|
||||
|
||||
services.codimd = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
allowAnonymous = false;
|
||||
allowGravatar = false;
|
||||
db = {
|
||||
dialect = "sqlite";
|
||||
storage = "/var/lib/codimd/db.codimd.sqlite";
|
||||
useCDN = false;
|
||||
};
|
||||
port = 3091;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -3,34 +3,22 @@ let
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
# Only allow PFS-enabled ciphers with AES256
|
||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud19;
|
||||
package = pkgs.nextcloud20;
|
||||
|
||||
https = true;
|
||||
|
||||
autoUpdateApps = {
|
||||
enable = true;
|
||||
startAt = "05:00:00";
|
||||
};
|
||||
|
||||
hostName = localAddresses.toum;
|
||||
hostName = "cloud.xn--kiern-0qa.de";
|
||||
|
||||
# https = true;
|
||||
config = {
|
||||
# overwriteProtocol = "https";
|
||||
overwriteProtocol = "https";
|
||||
|
||||
dbtype = "pgsql";
|
||||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
@@ -38,7 +26,7 @@ in
|
||||
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
|
||||
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
|
||||
adminuser = "admin";
|
||||
extraTrustedDomains = [ "toum.r" ];
|
||||
# extraTrustedDomains = [ "toum.r" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -53,6 +41,12 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
services.nginx.virtualHosts."cloud.xn--kiern-0qa.de" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
};
|
||||
|
||||
# Ensure that postgres is running before running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
|
||||
@@ -20,8 +20,13 @@ in {
|
||||
port = 443;
|
||||
};
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "kiosk";
|
||||
hostname = "zaatar.local";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
makanek = {
|
||||
hostname = "88.99.83.173";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
homeros = {
|
||||
|
||||
@@ -55,4 +55,9 @@ in {
|
||||
name = "toum";
|
||||
address = "toum.r";
|
||||
});
|
||||
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
||||
path = systems/makanek;
|
||||
name = "makanek";
|
||||
address = "88.99.83.173";
|
||||
});
|
||||
}
|
||||
|
||||
61
systems/makanek/configuration.nix
Normal file
61
systems/makanek/configuration.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
<niveum/configs/codimd.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/configs/sshd.nix>
|
||||
<niveum/configs/nextcloud.nix>
|
||||
<niveum/configs/save-space.nix>
|
||||
<niveum/configs/version.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens3.useDHCP = true;
|
||||
|
||||
networking.hostName = "makanek";
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
|
||||
boot.loader.grub.devices = [ "/dev/sda" ];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
networking.retiolum = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:56af:d12b:::df22";
|
||||
};
|
||||
|
||||
environment.etc."tinc/retiolum/rsa_key.priv" = {
|
||||
text = builtins.readFile <system-secrets/retiolum.key>;
|
||||
mode = "400";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
# Only allow PFS-enabled ciphers with AES256
|
||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
email = kieran.email;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.vim pkgs.git ];
|
||||
}
|
||||
21
systems/makanek/hardware-configuration.nix
Normal file
21
systems/makanek/hardware-configuration.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9eaeaaa7-b453-4634-8a69-d416f702d3aa";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 2;
|
||||
}
|
||||
Reference in New Issue
Block a user