mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Update to NixOs 21.11 and add dokuwiki
This commit is contained in:
parent
d8bbec67db
commit
a043edf25d
6 changed files with 52 additions and 9 deletions
14
dns.tf
14
dns.tf
|
|
@ -38,6 +38,20 @@ resource "hetznerdns_record" "jellyfin_a" {
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 600
|
ttl = 600
|
||||||
}
|
}
|
||||||
|
resource "hetznerdns_record" "anderia_a" {
|
||||||
|
zone_id = data.hetznerdns_zone.banditlair_zone.id
|
||||||
|
name = "anderia"
|
||||||
|
value = data.hcloud_floating_ip.main_ip.ip_address
|
||||||
|
type = "A"
|
||||||
|
ttl = 600
|
||||||
|
}
|
||||||
|
resource "hetznerdns_record" "arkadia_a" {
|
||||||
|
zone_id = data.hetznerdns_zone.banditlair_zone.id
|
||||||
|
name = "arkadia"
|
||||||
|
value = data.hcloud_floating_ip.main_ip.ip_address
|
||||||
|
type = "A"
|
||||||
|
ttl = 600
|
||||||
|
}
|
||||||
resource "hetznerdns_record" "db1_a" {
|
resource "hetznerdns_record" "db1_a" {
|
||||||
zone_id = data.hetznerdns_zone.banditlair_zone.id
|
zone_id = data.hetznerdns_zone.banditlair_zone.id
|
||||||
name = "db1"
|
name = "db1"
|
||||||
|
|
|
||||||
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -70,16 +70,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1637875414,
|
"lastModified": 1638587357,
|
||||||
"narHash": "sha256-Ica++SXFuLyxX9Q7YxhfZulUif6/gwM8AEQYlUxqSgE=",
|
"narHash": "sha256-2ySMW3QARG8BsRPmwe7clTbdCuaObromOKewykP+UJc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3bea86e918d8b54aa49780505d2d4cd9261413be",
|
"rev": "e34c5379866833f41e2a36f309912fa675d687c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-21.05",
|
"ref": "nixos-21.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
19
modules/dokuwiki.nix
Normal file
19
modules/dokuwiki.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
configureWiki = name: {
|
||||||
|
services.dokuwiki.sites = {
|
||||||
|
"${name}.${config.networking.domain}" = {
|
||||||
|
enable = true;
|
||||||
|
stateDir = "/nix/var/data/dokuwiki/${name}/data";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.phpfpm.pools."dokuwiki-${name}.${config.networking.domain}".phpPackage = lib.mkOverride 10 pkgs.php74;
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${name}.${config.networking.domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
configureWiki "anderia" // configureWiki "arkadia"
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
"${config.networking.domain}" = {
|
"${config.networking.domain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
acmeFallbackHost = "storage1.banditlair.com";
|
# acmeFallbackHost = "storage1.banditlair.com";
|
||||||
|
|
||||||
locations."= /.well-known/matrix/server".extraConfig =
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
let
|
let
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
../modules/synapse.nix
|
../modules/synapse.nix
|
||||||
../modules/nextcloud.nix
|
../modules/nextcloud.nix
|
||||||
../modules/custom-backup-job.nix
|
../modules/custom-backup-job.nix
|
||||||
|
../modules/dokuwiki.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
|
|
@ -26,7 +27,18 @@
|
||||||
sshKey = config.sops.secrets.borgPassphrase.path;
|
sshKey = config.sops.secrets.borgPassphrase.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.localCommands = "ip addr add 95.216.177.3/32 dev enp1s0";
|
networking.interfaces.enp1s0 = {
|
||||||
|
useDHCP = true;
|
||||||
|
ipv4 = {
|
||||||
|
addresses = [
|
||||||
|
{
|
||||||
|
address = "95.216.177.3";
|
||||||
|
prefixLength = 32;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 64738 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 64738 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 64738 ];
|
networking.firewall.allowedUDPPorts = [ 64738 ];
|
||||||
|
|
||||||
|
|
@ -45,6 +57,4 @@
|
||||||
start = "${pkgs.systemd}/bin/systemctl start nextcloud-data-sshfs.service"
|
start = "${pkgs.systemd}/bin/systemctl start nextcloud-data-sshfs.service"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.interfaces."ens10".allowedTCPPorts = [ 80 ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue