mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-03-10 21:04:10 -04:00
beginning of lighthouse
This commit is contained in:
parent
2b7270fdcc
commit
ef9e7a469f
9 changed files with 101 additions and 57 deletions
|
|
@ -1,37 +1,37 @@
|
|||
let
|
||||
volumePath = "/overseer/services";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.overseer.enable {
|
||||
sops.secrets."bookstack/key" = {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.overseer.enable {
|
||||
sops.secrets."bookstack/key" = {
|
||||
owner = "bookstack";
|
||||
};
|
||||
|
||||
services.restic.backups.bookstack = {
|
||||
user = "root";
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
backupPrepareCommand = "${pkgs.mariadb}/bin/mysqldump -u root bookstack > ${volumePath}/tmp/bookstack.sql";
|
||||
backupCleanupCommand = "rm ${volumePath}/tmp/bookstack.sql";
|
||||
paths = [
|
||||
"/var/lib/bookstack"
|
||||
"${volumePath}/tmp/bookstack.sql"
|
||||
];
|
||||
repositoryFile = config.sops.secrets."restic/url".path;
|
||||
passwordFile = config.sops.secrets."restic/key".path;
|
||||
};
|
||||
|
||||
services.bookstack = {
|
||||
};
|
||||
|
||||
services.restic.backups.bookstack = {
|
||||
user = "root";
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
backupPrepareCommand = "${pkgs.mariadb}/bin/mysqldump -u root bookstack > ${volumePath}/tmp/bookstack.sql";
|
||||
backupCleanupCommand = "rm ${volumePath}/tmp/bookstack.sql";
|
||||
paths = [
|
||||
"/var/lib/bookstack"
|
||||
"${volumePath}/tmp/bookstack.sql"
|
||||
];
|
||||
repositoryFile = config.sops.secrets."restic/url".path;
|
||||
passwordFile = config.sops.secrets."restic/key".path;
|
||||
};
|
||||
|
||||
services.bookstack = {
|
||||
enable = true;
|
||||
hostname = "bookstack.wanderingcrow.net";
|
||||
database.createLocally = true;
|
||||
appKeyFile = config.sops.secrets."bookstack/key".path;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue