hosts/ni/services/download-media: update service config and re-enable it

This commit is contained in:
Gabriel Arazas 2024-12-17 18:50:42 +08:00
parent 15dc3b7b6b
commit 51bdedf26c
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 7 additions and 8 deletions

View File

@ -21,6 +21,7 @@
services.monitoring.enable = true; services.monitoring.enable = true;
services.mail-archive.enable = true; services.mail-archive.enable = true;
services.reverse-proxy.enable = true; services.reverse-proxy.enable = true;
services.download-media.enable = true;
setups = { setups = {
desktop.enable = true; desktop.enable = true;
development.enable = true; development.enable = true;

View File

@ -1,9 +1,10 @@
{ config, lib, pkgs, foodogsquaredLib, ... }: { config, lib, pkgs, foodogsquaredLib, ... }:
let let
inherit (foodogsquaredLib.sops-nix) getSecrets attachSopsPathPrefix;
hostCfg = config.hosts.ni; hostCfg = config.hosts.ni;
cfg = hostCfg.services.download-media; cfg = hostCfg.services.download-media;
mountName = "/mnt/archives"; mountName = "/media/laptop-ssd/Archives";
deviantArt = name: "https://deviantart.com/${name}"; deviantArt = name: "https://deviantart.com/${name}";
artStation = name: "https://www.artstation.com/${name}"; artStation = name: "https://www.artstation.com/${name}";
@ -97,16 +98,11 @@ in
lib.listToAttrs jobsList; lib.listToAttrs jobsList;
in in
{ {
sops.secrets = foodogsquaredLib.sops-nix.getSecrets ./secrets.yaml sops.secrets = getSecrets ./secrets.yaml
(lib.attachSopsPathPrefix pathPrefix { (attachSopsPathPrefix pathPrefix {
"secrets-config" = { }; "secrets-config" = { };
}); });
# This is to make an exception for Archivebox.
nixpkgs.config.permittedInsecurePackages = [
"python3.12-django-3.1.14"
];
suites.filesystem.setups.archive.enable = true; suites.filesystem.setups.archive.enable = true;
services.yt-dlp = { services.yt-dlp = {
@ -211,6 +207,8 @@ in
prependArgs = galleryDlArgs; prependArgs = galleryDlArgs;
}; };
}; };
environment.systemPackages = with pkgs; [ archivebox ];
} }
); );
} }