mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-19 21:44:13 -05:00
add some overseer files
This commit is contained in:
parent
4cae26f26a
commit
075a5ff111
4 changed files with 96 additions and 12 deletions
|
|
@ -5,6 +5,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./user.nix
|
||||
./podman.nix
|
||||
./routing.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# virtualisation.oci-containers = {
|
||||
# backend = "podman";
|
||||
# containers = {
|
||||
# containers.grimoire = {
|
||||
#
|
||||
}
|
||||
23
modules/users/overseer/routing.nix
Normal file
23
modules/users/overseer/routing.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
let
|
||||
primary = "wanderingcrow.net";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
|
||||
virtualHosts = {
|
||||
"vault.${primary}" = {
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://localhost:8200";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
71
modules/users/overseer/services.nix
Normal file
71
modules/users/overseer/services.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
let
|
||||
volumePath = "/overseer/services";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Create the dirs we need
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${volumePath}"
|
||||
"d ${volumePath}/vault/data 700 overseer overseer" # Vault says this needs to already exist upon boot
|
||||
|
||||
"d ${volumePath}/paperless/data 700 overseer overseer"
|
||||
"d ${volumePath}/paperless/media 700 overseer overseer"
|
||||
];
|
||||
|
||||
# (Arguably) Most Important Service - backups
|
||||
services.restic.backups = {
|
||||
vault = {
|
||||
user = "root";
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Vault Service
|
||||
#services.vault = {
|
||||
# enable = true;
|
||||
# package = pkgs.vault-bin;
|
||||
# storageBackend = "raft";
|
||||
# storagePath = "${volumePath}/vault/data";
|
||||
# address = "127.0.0.1:8200";
|
||||
# extraConfig = ''
|
||||
# ui = true
|
||||
# api_addr = "http://127.0.0.1:8200"
|
||||
# cluster_addr = "http://127.0.0.1:8201"
|
||||
# '';
|
||||
#};
|
||||
|
||||
# Paperless-ngx
|
||||
#services.paperless = {
|
||||
# enable = true;
|
||||
# mediaDir = "${volumePath}/paperless/media";
|
||||
# dataDir = "${volumePath}/paperless/data";
|
||||
#};
|
||||
|
||||
# OCI services
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
## NGINX Proxy Manager
|
||||
NPM = {
|
||||
image = "jc21/nginx-proxy-manager:latest";
|
||||
autoStart = true;
|
||||
ports = [
|
||||
"80:80"
|
||||
"443:443"
|
||||
"81:81"
|
||||
];
|
||||
volumes = [
|
||||
"${volumePath}/NPM/data:/data"
|
||||
"${volumePath}/NPM/letsencrypt:/etc/letsencrypt"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue