Compare commits

..

No commits in common. "d693c4a93b0aa75204465269d79d050cb0c0d1c5" and "48fb68c2fd24a0ee2815402bd88a3290f83a290e" have entirely different histories.

7 changed files with 23 additions and 153 deletions

View file

@ -1,16 +0,0 @@
$TTL 604800
@ IN SOA ns1.depeuter.dev. admin.depeuter.dev. (
5 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers - NS records
IN NS ns1.depeuter.dev.
; IN NS ns2.depeuter.dev.
ns1.depeuter.dev. IN A 192.168.0.91
;ns1.depeuter.dev. IN A 192.158.0.X
hugo.depeuter.dev. IN A 192.168.0.11

View file

@ -1,54 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homelab.apps.bind9;
in {
options.homelab.apps.bind9.enable = lib.mkEnableOption "ISC BIND 9 (Docker)";
config = lib.mkIf cfg.enable {
homelab.virtualisation.containers.enable = true;
environment.etc = {
"bind/named.conf" = {
source = ./named.conf;
mode = "0555";
};
"bind/named.conf.options" = {
source = ./named.conf.options;
mode = "0555";
};
"bind/named.conf.local" = {
source = ./named.conf.local;
mode = "0555";
};
"bind/zones/db.depeuter.dev" = {
source = ./db.depeuter.dev;
mode = "0555";
};
};
virtualisation.oci-containers.containers.bind9 = {
hostname = "bind9";
#image = "internetsystemsconsortium/bind9:9.20"; # Current stable
image = "ubuntu/bind9"; # Current stable
autoStart = true;
ports = [
"53:53/udp"
"53:53/tcp"
"953:953/tcp"
];
extraOptions = [
];
environment = {
};
volumes = [
"/etc/bind:/etc/bind" # For configuration, your `named.conf` lives here
"bind9-cache:/var/cache/bind"
#"...:/var/lib/bind" # Secondary zones
"bind9-logs:/var/log" # Logfiles
];
labels = {
};
};
};
}

View file

@ -1,2 +0,0 @@
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";

View file

@ -1,4 +0,0 @@
zone "depeuter.dev" {
type primary;
file "/etc/bind/zones/db.depeuter.dev";
};

View file

@ -1,35 +0,0 @@
http local {
endpoints { "/dns-query"; };
};
acl bogusnets {
};
acl trusted {
192.168.0.0/16;
};
options {
directory "/var/cache/bind";
version "not currently available";
listen-on { any; };
listen-on-v6 { any; };
listen-on tls ephemeral { any; };
listen-on-v6 tls ephemeral { any; };
listen-on tls ephemeral http local { any; };
listen-on-v6 tls ephemeral http local { any; };
recursion yes;
forwarders {
9.9.9.9;
149.112.112.112;
};
forward only;
allow-query { any; };
allow-recursion { any; };
allow-transfer { none; };
blackhole { bogusnets; };
};

View file

@ -6,28 +6,24 @@ let
PUID = toString config.users.users.calibre.uid; PUID = toString config.users.users.calibre.uid;
PGID = toString config.users.groups.media.gid; PGID = toString config.users.groups.media.gid;
books = "/srv/books";
calibre-config = "/srv/calibre-config";
calibre-web-config = "/srv/calibre-web-config";
networkName = "calibre"; networkName = "calibre";
in { in {
options.homelab.apps.calibre = { options.homelab.apps.calibre = {
enable = lib.mkEnableOption "Calibre (Desktop + Web)"; enable = lib.mkEnableOption "Calibre (Desktop + Web)";
desktop.enable = lib.mkEnableOption "Calibre Desktop (KasmVNC)"; desktop = lib.mkEnableOption "Calibre Desktop (KasmVNC)";
web.enable = lib.mkEnableOption "Calibre Web"; web = lib.mkEnableOption "Calibre Web";
}; };
config = lib.mkMerge [ config = lib.mkMerge [
{ {
homelab.apps.calibre = lib.mkIf cfg.enable { homelab.apps.calibre = lib.mkIf cfg.enable {
desktop.enable = true; desktop = true;
web.enable = true; web = true;
}; };
} }
# Common # Common
(lib.mkIf (cfg.desktop.enable || cfg.web.enable) { (lib.mkIf (cfg.desktop || cfg.web) {
homelab = { homelab = {
users.media.enable = true; users.media.enable = true;
virtualisation.containers.enable = true; virtualisation.containers.enable = true;
@ -41,7 +37,7 @@ in {
shell = null; shell = null;
}; };
fileSystems."${books}" = { fileSystems."/srv/books" = {
device = "192.168.0.11:/mnt/SMALL/MEDIA/BOOKS"; device = "192.168.0.11:/mnt/SMALL/MEDIA/BOOKS";
fsType = "nfs"; fsType = "nfs";
options = [ options = [
@ -73,8 +69,8 @@ in {
}) })
# Calibre desktop # Calibre desktop
(lib.mkIf cfg.desktop.enable { {
fileSystems."${calibre-config}" = { fileSystems."/srv/calibre-config" = {
device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE"; device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE";
fsType = "nfs"; fsType = "nfs";
options = [ options = [
@ -88,15 +84,13 @@ in {
]; ];
}; };
virtualisation.oci-containers.containers.calibre = let virtualisation.oci-containers.containers.calibre = {
innerPort = 8080;
in {
hostname = "calibre"; hostname = "calibre";
image = "lscr.io/linuxserver/calibre:8.5.0"; image = "lscr.io/linuxserver/calibre:latest";
autoStart = true; autoStart = true;
ports = [ ports = [
# Open ports if you don't use Traefik # Open ports if you don't use Traefik
"9480:${toString innerPort}" # Calibre desktop GUI "9480:8080" # Calibre desktop GUI
#"9481:8181" # Calibre desktop GUI HTTPS #"9481:8181" # Calibre desktop GUI HTTPS
#"9581:8081" # Calibre webserver gui #"9581:8081" # Calibre webserver gui
]; ];
@ -116,21 +110,16 @@ in {
#CLI_ARGS = ""; #CLI_ARGS = "";
}; };
volumes = [ volumes = [
"${calibre-config}:/config" "/srv/calibre-config:/config"
"${books}:/media/books" "/srv/books:/media/books"
]; ];
labels = {
"traefik.enable" = "true";
"traefik.http.routers.calibre.rule" = "Host(`calibre.depeuter.dev`)";
"traefik.http.services.calibre.loadbalancer.server.port" = toString innerPort;
}; };
}; }
})
# Calibre Web # Calibre Web
(lib.mkIf cfg.web.enable { {
fileSystems."${calibre-web-config}" = { fileSystems."/srv/calibre-web-config" = {
device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE-WEB"; device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE-WEB";
fsType = "nfs"; fsType = "nfs";
options = [ options = [
@ -144,15 +133,13 @@ in {
]; ];
}; };
virtualisation.oci-containers.containers.calibre-web = let virtualisation.oci-containers.containers.calibre-web = {
innerPort = 8083;
in {
hostname = "calibre-web"; hostname = "calibre-web";
image = "lscr.io/linuxserver/calibre-web:0.6.24"; image = "lscr.io/linuxserver/calibre-web:latest";
autoStart = true; autoStart = true;
ports = [ ports = [
# Open ports if you don't use Traefik # Open ports if you don't use Traefik
"8083:${toString innerPort}" # Web UI "8083:8083" # Web UI
]; ];
extraOptions = [ extraOptions = [
"--network=${networkName}" "--network=${networkName}"
@ -169,16 +156,11 @@ in {
#OAUTHLIB_RELAX_TOKEN_SCOPE = "1"; #OAUTHLIB_RELAX_TOKEN_SCOPE = "1";
}; };
volumes = [ volumes = [
"${calibre-web-config}:/config" "/srv/calibre-web-config:/config"
"${books}:/media/books" "/srv/books:/media/books"
]; ];
labels = {
"traefik.enable" = "true";
"traefik.http.routers.calibre-web.rule" = "Host(`books.depeuter.dev`)";
"traefik.http.services.calibre-web.loadbalancer.server.port" = toString innerPort;
}; };
}; }
})
]; ];
} }

View file

@ -1,7 +1,6 @@
{ {
imports = [ imports = [
./arr ./arr
./bind9
./calibre ./calibre
./changedetection ./changedetection
./freshrss ./freshrss