sombrero: Add ppp.pm-site

This commit is contained in:
Alexander Heldt
2023-11-12 21:49:30 +01:00
parent 9655c2c1d7
commit c24b4615f3
4 changed files with 60 additions and 1 deletions

23
flake.lock generated
View File

@@ -266,6 +266,26 @@
"type": "github" "type": "github"
} }
}, },
"pppdotpm-site": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1699822965,
"narHash": "sha256-zuUWYp22VXkMnDeCR2IRA70VXHsnCPrlhIBq5I1nAhA=",
"ref": "refs/heads/main",
"rev": "d2f73291ae58f1095bc4b19a15454dc0b8406334",
"revCount": 3,
"type": "git",
"url": "https://codeberg.org/ppp/ppp.pm-site.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/ppp/ppp.pm-site.git"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@@ -274,7 +294,8 @@
"hyprland-contrib": "hyprland-contrib", "hyprland-contrib": "hyprland-contrib",
"nh": "nh", "nh": "nh",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"pppdotpm-site": "pppdotpm-site"
} }
}, },
"systems": { "systems": {

View File

@@ -30,6 +30,11 @@
url = "github:hyprwm/contrib"; url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
pppdotpm-site = {
url = "git+https://codeberg.org/ppp/ppp.pm-site.git";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, ... }@inputs: { outputs = { self, ... }@inputs: {
@@ -53,6 +58,7 @@
./hosts/sombrero/configuration.nix ./hosts/sombrero/configuration.nix
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.pppdotpm-site.nixosModules.default
./hosts/sombrero/home.nix ./hosts/sombrero/home.nix
]; ];
}; };

View File

@@ -86,6 +86,7 @@
calibre-web.enable = true; calibre-web.enable = true;
transmission.enable = true; transmission.enable = true;
restic.enable = true; restic.enable = true;
pppdotpm-site.enable = true;
}; };
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system

View File

@@ -0,0 +1,31 @@
{ lib, config, ... }:
let
enabled = config.mod.pppdotpm-site.enable;
nginxEnabled = config.mod.nginx.enable;
in
{
options = {
mod.pppdotpm-site = {
enable = lib.mkEnableOption "enable ppp.pm site";
};
};
config = {
security.acme = lib.mkIf (enabled && nginxEnabled) {
certs = {
"ppp.pm" = {
webroot = "/var/lib/acme/acme-challenge/";
email = "p@ppp.pm";
group = "nginx";
};
};
};
services.pppdotpm-site = {
enable = true;
domain = "ppp.pm";
useACMEHost = "ppp.pm";
};
};
}