Compare commits
No commits in common. "1219865a7fe244a0d130b3fe62e481b9cbcf8e06" and "70d29ad570a20f705a3e8afcc0a34d223d80bc4f" have entirely different histories.
1219865a7f
...
70d29ad570
5 changed files with 64 additions and 107 deletions
|
@ -5,11 +5,10 @@
|
|||
./ddns.nix
|
||||
./nginx.nix
|
||||
./forgejo.nix
|
||||
#./printing.nix
|
||||
./restic.nix
|
||||
./ssh.nix
|
||||
./vaultwarden.nix
|
||||
./nextcloud.nix
|
||||
./domains.nix
|
||||
];
|
||||
services.domains.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.domains;
|
||||
in
|
||||
{
|
||||
domains = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.nullOr types.bool;
|
||||
};
|
||||
domain = mkOption {
|
||||
description = ''
|
||||
Domain of the server.
|
||||
'';
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
git = mkOption {
|
||||
description = ''
|
||||
Subdomain of the git instance.
|
||||
'';
|
||||
type = types.nullOr types.str;
|
||||
default = "git";
|
||||
};
|
||||
vaultwarden = mkOption {
|
||||
description = ''
|
||||
Subdomain of the vaultwarden instance
|
||||
'';
|
||||
default = "vaultwarden";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
video = mkOption {
|
||||
description = ''
|
||||
Subdomain of the video instance
|
||||
'';
|
||||
default = "video";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
www = mkOption {
|
||||
description = ''
|
||||
Subdomain of the www instance
|
||||
'';
|
||||
default = "www";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
files = mkOption {
|
||||
description = ''
|
||||
Subdomain of the files instance
|
||||
'';
|
||||
default = "files";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
cloud = mkOption {
|
||||
description = ''
|
||||
Subdomain of the cloud instance
|
||||
'';
|
||||
default = "cloud";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
gitURL = "${cfg.git}.${cfg.domain}";
|
||||
};
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
config.adminpassFile = "${../../nix-secrets/dafoe/nextcloud/adminpass}";
|
||||
configureRedis = true;
|
||||
maxUploadSize = "1G";
|
||||
#nginx.enable = true;
|
||||
settings.overwriteProtocol = "https";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, inputs, config, ... }:
|
||||
{ lib, pkgs, inputs, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
@ -8,36 +8,36 @@
|
|||
recommendedTlsSettings = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = let domain = "vatthauer.xyz"; in
|
||||
{
|
||||
"config.domains.gitURL" = {
|
||||
services.nginx.virtualHosts."git.vatthauer.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3001/";
|
||||
};
|
||||
};
|
||||
"vaultwarden.${domain}" = {
|
||||
|
||||
services.nginx.virtualHosts."vaultwarden.vatthauer.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8222/";
|
||||
};
|
||||
};
|
||||
"video.${domain}" = {
|
||||
|
||||
services.nginx.virtualHosts."video.vatthauer.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = false;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8096";
|
||||
};
|
||||
};
|
||||
"www.${domain}" = {
|
||||
serverAliases = [ domain ];
|
||||
services.nginx.virtualHosts."www.vatthauer.xyz" = {
|
||||
serverAliases = [ "vatthauer.xyz" ];
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
root = pkgs.callPackage ./resumee-website.nix {};
|
||||
};
|
||||
"files.${domain}" = {
|
||||
services.nginx.virtualHosts."files.vatthauer.xyz" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
|
@ -45,9 +45,10 @@
|
|||
extraConfig = "autoindex on;";
|
||||
};
|
||||
};
|
||||
"cloud.${domain}" = {
|
||||
services.nginx.virtualHosts."cloud.vatthauer.xyz" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
#locations."/".proxyPass = "http://localhost:8080";
|
||||
# nextcloud does location setup itself
|
||||
};
|
||||
}
|
||||
|
|
20
dafoe/services/printing.nix
Normal file
20
dafoe/services/printing.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable CUPS to print documents.
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
};
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.splix ];
|
||||
browsing = true;
|
||||
listenAddresses = [ "*:631" ];
|
||||
allowFrom = [ "all" ];
|
||||
defaultShared = true;
|
||||
extraConf = ''
|
||||
BrowseLocalProtocols all
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue