Compare commits

..

No commits in common. "e47fa1c30230f110907ef8ef315494ec2bca7b2f" and "e7dcee07f8b0e018c6c2edb24042938176a887e8" have entirely different histories.

3 changed files with 4 additions and 68 deletions

View file

@ -2,14 +2,11 @@
lib,
pkgs,
config,
host,
username,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
baseRepo = "ssh://liv@dandelion:9123/spinners/rootvol/backups/${host}";
in
{
services = {
@ -24,8 +21,6 @@ in
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3050;
DISABLE_SSH = false;
SSH_PORT = 2222;
};
# You can temporarily allow registration to create an admin user.
service.DISABLE_REGISTRATION = true;
@ -75,31 +70,6 @@ in
proxyWebsockets = true;
};
};
borgbackup.jobs."violet-forgejo" = {
paths = [ "/var/lib/forgejo" ];
repo = "${baseRepo}/var-forgejo";
encryption.mode = "none";
compression = "auto,zstd";
startAt = "daily";
preHook = ''
systemctl stop forgejo
'';
postHook = ''
systemctl start forgejo
if [ $exitStatus -eq 2 ]; then
${pkgs.ntfy-sh}/bin/ntfy send https://notify.liv.town/${host} "borgbackup: ${host} backup (forgejo) failed with errors"
else
${pkgs.ntfy-sh}/bin/ntfy send https://notify.liv.town/${host} "borgbackup: ${host} backup (forgejo) completed succesfully with exit status $exitStatus"
fi
'';
user = "root";
extraCreateArgs = [
"--stats"
];
environment = {
BORG_RSH = "ssh -p 9123 -i /home/${username}/.ssh/id_ed25519";
};
};
};
# systemd.services.forgejo.preStart = let
# adminCmd = "${lib.getExe cfg.package} admin user";

View file

@ -1,13 +1,4 @@
{
config,
host,
username,
pkgs,
...
}:
let
baseRepo = "ssh://liv@dandelion:9123/spinners/rootvol/backups/${host}";
in
{ config, ... }:
{
services = {
grafana = {
@ -28,30 +19,5 @@ in
proxyWebsockets = true;
};
};
borgbackup.jobs."violet-grafana" = {
paths = [ "/var/lib/grafana" ];
repo = "${baseRepo}/var-grafana";
encryption.mode = "none";
compression = "auto,zstd";
startAt = "daily";
preHook = ''
systemctl stop grafana
'';
postHook = ''
systemctl start grafana
if [ $exitStatus -eq 2 ]; then
${pkgs.ntfy-sh}/bin/ntfy send https://notify.liv.town/${host} "borgbackup: ${host} backup (grafana) failed with errors"
else
${pkgs.ntfy-sh}/bin/ntfy send https://notify.liv.town/${host} "borgbackup: ${host} backup (grafana) completed succesfully with exit status $exitStatus"
fi
'';
user = "root";
extraCreateArgs = [
"--stats"
];
environment = {
BORG_RSH = "ssh -p 9123 -i /home/${username}/.ssh/id_ed25519";
};
};
};
}

View file

@ -23,11 +23,11 @@ in
libvdpau-va-gl
vulkan-loader
vulkan-validation-layers
# amdvlk # error: 'amdvlk' has been removed since it was deprecated by AMD. Its replacement, RADV, is enabled by default.
amdvlk
mesa.opencl
];
extraPackages32 = with pkgs; [
# driversi686Linux.amdvlk # Install amdvlk for 32 bit applications as well
driversi686Linux.amdvlk # Install amdvlk for 32 bit applications as well
];
};
enableRedistributableFirmware = true;
@ -36,7 +36,7 @@ in
boot.initrd.kernelModules = [ "amdgpu" ];
environment.systemPackages = with pkgs; [
# amdvlk
amdvlk
];
};
}