add everything to motd
This commit is contained in:
@@ -4,15 +4,20 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
service = "cloudflare-ddns";
|
||||
cfg = config.homelab.ddns;
|
||||
sec = config.sops.secrets;
|
||||
in {
|
||||
options.homelab.ddns = {
|
||||
enable = lib.mkEnableOption "enables ddns with cloudflare";
|
||||
motd = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = service;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.cloudflare-ddns = {
|
||||
services.${service} = {
|
||||
enable = true;
|
||||
credentialsFile = sec."cloudflare/api_token".path;
|
||||
domains = [
|
||||
|
||||
@@ -19,6 +19,10 @@ in {
|
||||
default = "10.10.0.1";
|
||||
description = "set upstream dns server for ${service} (default: $cfg.upstream}";
|
||||
};
|
||||
motd = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = service;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
@@ -4,15 +4,20 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
service = "tailscale";
|
||||
cfg = config.homelab.tailscale;
|
||||
sec = config.sops.secrets;
|
||||
in {
|
||||
options.homelab.tailscale = {
|
||||
enable = lib.mkEnableOption "enables tailscale";
|
||||
motd = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = service;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.tailscale = {
|
||||
services.${service} = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
useRoutingFeatures = "both";
|
||||
|
||||
@@ -13,7 +13,7 @@ zstd -dc <path_to_backup> | mysql -u root -p <database_name>
|
||||
to restore a postgres database:
|
||||
sudo -u postgres psql -c "DROP DATABASE IF EXISTS <database_name>;" # delete old db if lingering (prolly wont work)
|
||||
sudo -u postgres psql -c "CREATE DATABASE <database_name>;" # create empty db w/ correct name
|
||||
zstd -dc <path_to_backup> | sudo -u postgres psql -d immich # restore from the dump
|
||||
zstd -dc <path_to_backup> | sudo -u postgres psql -d <database_name> # restore from the dump
|
||||
*/
|
||||
let
|
||||
cfg = config.homelab.backups;
|
||||
|
||||
Reference in New Issue
Block a user