Update LNBits version and modify desktop entries

- Update LNBits version to v0.12.12 in flake.lock and flake.nix
- Modify desktop entries for Zathura, Nsxiv-wrapper, Nvim-wrapper, and Mpv-wrapper in default.nix
- Add arrstack.nix and Restic backups for Jellyfin configuration
This commit is contained in:
Sam 2025-01-07 16:35:16 +00:00
parent 8f1e6bc630
commit 885ffb003a
7 changed files with 67 additions and 33 deletions

View File

@ -385,15 +385,16 @@
"poetry2nix": "poetry2nix" "poetry2nix": "poetry2nix"
}, },
"locked": { "locked": {
"lastModified": 1734684489, "lastModified": 1729199171,
"narHash": "sha256-df2CZXIEE8rQPyKNI7dzXzDGxTPERla8hvEiACyObgA=", "narHash": "sha256-NX/fzZfGppFkP7yoRJyg/0pKo9y4+agBnO4XCgbzp3U=",
"owner": "lnbits", "owner": "lnbits",
"repo": "lnbits", "repo": "lnbits",
"rev": "3900d2871d2e8ec5a00028eb4e2e59417c4fb08e", "rev": "51c9d294cdb40c777b1048bbee267b49cdaf7a34",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnbits", "owner": "lnbits",
"ref": "v0.12.12",
"repo": "lnbits", "repo": "lnbits",
"type": "github" "type": "github"
} }

View File

@ -33,7 +33,7 @@
}; };
lnbits = { lnbits = {
url = "github:lnbits/lnbits"; url = "github:lnbits/lnbits/v0.12.12";
}; };
# Nix colors # Nix colors

View File

@ -1,35 +1,31 @@
{pkgs, ...}: {pkgs, ...}: {
{
imports = [./scripts.nix];
xdg.desktopEntries = { xdg.desktopEntries = {
firefox = { firefox = {
name = "Firefox"; name = "Firefox";
exec = "${pkgs.firefox}/bin/firefox"; exec = "${pkgs.firefox}/bin/firefox";
}; };
zathura = { zathura-wrapper = {
name = "Zathura"; name = "Zathura-wrapper";
exec = "${pkgs.zathura}/bin/zathura"; exec = "st -T st-float -g 150x50 -e zathura %F";
terminal = false; terminal = false;
mimeType = ["application/pdf"]; mimeType = ["application/pdf"];
}; };
nsxiv-wrapper = { nsxiv-wrapper = {
name = "Nsxiv-wrapper"; name = "Nsxiv-wrapper";
# exec = "nsxiv-wrapper %f"; # exec = "nsxiv-wrapper %f";
exec = "st -c xdg-open-nsxiv -T st-float -g 150x50 -e nsxiv %F"; exec = "st -T st-float -g 150x50 -e nsxiv %F";
terminal = false; terminal = false;
mimeType = ["image/*"]; mimeType = ["image/*"];
}; };
nvim-wrapper = { nvim-wrapper = {
name = "Nvim-wrapper"; name = "Nvim-wrapper";
exec = "st -c xdg-open-nvim -T st-float -g 150x50 -e nvim %F"; exec = "st -T st-float -g 150x50 -e nvim %F";
terminal = false; terminal = false;
mimeType = ["text/*"]; mimeType = ["text/*"];
}; };
mpv-wrapper = { mpv-wrapper = {
name = "Mpv-wrapper"; name = "Mpv-wrapper";
exec = "st -c xdg-open-mpv -T st-float -g 150x50 -e mpv %F"; exec = "st -T st-float -g 150x50 -e mpv %F";
terminal = false; terminal = false;
mimeType = ["video/*"]; mimeType = ["video/*"];
}; };
@ -38,7 +34,7 @@
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"application/pdf" = "zathura.desktop"; "application/pdf" = "zathura-wrapper.desktop";
# text # text
"text/html" = "firefox.desktop"; "text/html" = "firefox.desktop";

View File

@ -1,17 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
(writeShellScriptBin "nsxiv-wrapper" ''
# Script to open image files with nsxiv
monitor_name=$(get-focused-monitor)
monitor_info=$(${xorg.xrandr}/bin/xrandr | grep "$monitor_name")
width=$(echo $monitor_info | grep -oP '\d+x\d+' | cut -dx -f1)
height=$(echo $monitor_info | grep -oP '\d+x\d+' | cut -dx -f2)
scale_width=$(( $width/4 + $width/2 ))
scale_height=$(( $height/4 + $height/2 ))
echo "$1" | ${nsxiv}/bin/nsxiv -ioq -g "$scale_width"x"$scale_height" -N float
'')
];
}

View File

@ -18,6 +18,7 @@
./common/optional/notes.nix ./common/optional/notes.nix
./common/optional/yazi.nix ./common/optional/yazi.nix
./common/optional/transmission.nix ./common/optional/transmission.nix
./common/optional/desktop/common/xdg
]; ];
home.packages = [ home.packages = [

View File

@ -0,0 +1,42 @@
{config, pkgs, ...}: let
# openVpnPwd = config.sops.secrets."software/proton/openvpn/password".path;
# openVpnUser = config.sops.secrets."software/proton/openvpn/username".path;
in {
services.restic.backups = {
daily = {
paths = [
"/srv/media-server/arrstack"
];
exclude = [
];
};
};
virtualisation.arion = {
backend = "podman-socket";
projects.jellyfin = {
settings = {
services.gluetun.service = {
ports = [
"8076:8076"
];
image = "qmcgaw/gluetun";
restart = "always";
volumes = [
"/srv/media-server/arrstack/gluetun:/gluetun"
];
environment = {
VPN_SERVICE_PROVIDE = "protonvpn";
VPN_TYPE = "openvpn";
SERVER_COUNTRIES = "Switzerland";
};
devices = ["/dev/net/tun:/dev/net/tun"];
command = [
"${pkgs.writeScript "entrypoint" "export TEST=test"}"
];
};
};
};
};
}

View File

@ -1,4 +1,14 @@
{ {
services.restic.backups = {
daily = {
paths = [
"/srv/media-server/jellyfin"
];
exclude = [
];
};
};
virtualisation.arion = { virtualisation.arion = {
backend = "podman-socket"; backend = "podman-socket";
projects.jellyfin = { projects.jellyfin = {
@ -21,6 +31,7 @@
environment = { environment = {
PUID = "1000"; PUID = "1000";
PGID = "1000"; PGID = "1000";
DOCKER_MODS="linuxserver/mods:jellyfin-opencl-intel";
}; };
devices = ["/dev/dri:/dev/dri"]; devices = ["/dev/dri:/dev/dri"];
}; };