Homelab updates
- Change domain to opdavies.uk as this works with HTTPS/SSL. - Switch Nginx to Caddy.
This commit is contained in:
parent
f43069adac
commit
07fde36fb0
17 changed files with 98 additions and 64 deletions
|
@ -3,13 +3,16 @@
|
|||
{
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "oliver@oliverdavies.uk";
|
||||
defaults.environmentFile = config.age.secrets.cloudflare.path;
|
||||
|
||||
defaults = {
|
||||
dnsProvider = "cloudflare";
|
||||
email = "oliver@oliverdavies.uk";
|
||||
environmentFile = config.age.secrets.cloudflare.path;
|
||||
webroot = null;
|
||||
};
|
||||
|
||||
certs."oliverdavies.uk" = {
|
||||
domain = "oliverdavies.uk";
|
||||
dnsProvider = "cloudflare";
|
||||
webroot = null;
|
||||
|
||||
extraDomainNames = [
|
||||
# TODO Refactor to use a wildcard certificate.
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ inputs, pkgs, ... }:
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
./modules/acme.nix
|
||||
];
|
||||
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
@ -30,4 +32,6 @@
|
|||
80
|
||||
443
|
||||
];
|
||||
|
||||
services.caddy.enable = true;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,5 @@
|
|||
./configuration.nix
|
||||
./secrets.nix
|
||||
./extra.nix
|
||||
|
||||
./modules/nginx.nix
|
||||
];
|
||||
}
|
||||
|
|
19
nix/hosts/nixedo/modules/acme.nix
Normal file
19
nix/hosts/nixedo/modules/acme.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
|
||||
certs = {
|
||||
"opdavies.uk" = {
|
||||
domain = "opdavies.uk";
|
||||
dnsProvider = "cloudflare";
|
||||
email = "oliver@oliverdavies.uk";
|
||||
environmentFile = config.age.secrets.cloudflare-opdavies-uk.path;
|
||||
webroot = null;
|
||||
|
||||
extraDomainNames = [ "*.opdavies.uk" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts = {
|
||||
"syncthing.localhost".locations."/".proxyPass = "http://localhost:8384/";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
age.secrets = {
|
||||
cloudflare-opdavies-uk.file = ../../secrets/cloudflare-opdavies-uk.age;
|
||||
tubearchivist.file = ../../secrets/tubearchivist.age;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue