Revert "Clean up packages and refactor nginx config"

This reverts commit 375758a958.
This commit is contained in:
2020-01-28 21:54:39 +01:00
parent 5eb5e446ad
commit 1af6e07072
6 changed files with 48 additions and 24 deletions

View File

@@ -1,7 +1,13 @@
# Syncthing and Radicale configuration
{ config, pkgs, lib, ... }:
{
# Enable Syncthing
environment.systemPackages = with pkgs; [
syncthing
radicale
];
# Enable syncthing
services.syncthing = {
enable = true;
openDefaultPorts = true;

View File

@@ -1,6 +1,10 @@
# Software development configuration
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
gitea
];
# Gitea setup with daily backup
services.gitea = {
enable = true;
@@ -16,4 +20,8 @@
dump.enable = true;
appName = "Gitea";
};
# Restart nginx after startup
systemd.services.nginx.after = [ "gitea.service" ];
}

View File

@@ -4,6 +4,11 @@
in
{
environment.systemPackages = with pkgs; [
ddclient
];
# Dynamic DNS configuration
services.ddclient = {
enable = true;

View File

@@ -1,6 +1,12 @@
# CUPS and SANE configuration
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
cups
sane-backends
];
# Enable CUPS with Zeroconf
services.printing = {
enable = true;

View File

@@ -3,8 +3,10 @@
{
environment.systemPackages = with pkgs; [
nginx
postgresql_11
libressl
miniflux
];
services.nginx = {
@@ -50,26 +52,24 @@
forceSSL = true;
sslCertificate = "/var/lib/acme/coolneng.duckdns.org/fullchain.pem";
sslCertificateKey = "/var/lib/acme/coolneng.duckdns.org/key.pem";
locations = {
"/radicale/" = {
proxyPass = "http://localhost:5232/";
extraConfig = ''
proxy_set_header X-Script-Name /radicale;
proxy_pass_header Authorization;
'';
};
"/syncthing/" = {
proxyPass = "http://localhost:8384/";
};
"/gitea/" = {
proxyPass = "http://localhost:3000/";
};
"/miniflux/" = {
proxyPass = "http://localhost:8080/miniflux/";
};
"/wallabag/" = {
proxyPass = "http://localhost:8081/";
};
locations."/radicale/" = {
proxyPass = "http://localhost:5232/";
extraConfig = ''
proxy_set_header X-Script-Name /radicale;
proxy_pass_header Authorization;
'';
};
locations."/syncthing/" = {
proxyPass = "http://localhost:8384/";
};
locations."/gitea/" = {
proxyPass = "http://localhost:3000/";
};
locations."/miniflux/" = {
proxyPass = "http://localhost:8080/miniflux/";
};
locations."/wallabag/" = {
proxyPass = "http://localhost:8081/";
};
};
};
@@ -133,6 +133,4 @@
};
};
# Restart nginx after
systemd.services.nginx.after = [ "gitea.service" "syncthing.service" "miniflux.service" ];
}