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"
},
"locked": {
"lastModified": 1734684489,
"narHash": "sha256-df2CZXIEE8rQPyKNI7dzXzDGxTPERla8hvEiACyObgA=",
"lastModified": 1729199171,
"narHash": "sha256-NX/fzZfGppFkP7yoRJyg/0pKo9y4+agBnO4XCgbzp3U=",
"owner": "lnbits",
"repo": "lnbits",
"rev": "3900d2871d2e8ec5a00028eb4e2e59417c4fb08e",
"rev": "51c9d294cdb40c777b1048bbee267b49cdaf7a34",
"type": "github"
},
"original": {
"owner": "lnbits",
"ref": "v0.12.12",
"repo": "lnbits",
"type": "github"
}

View File

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

View File

@ -1,35 +1,31 @@
{pkgs, ...}:
{
imports = [./scripts.nix];
{pkgs, ...}: {
xdg.desktopEntries = {
firefox = {
name = "Firefox";
exec = "${pkgs.firefox}/bin/firefox";
};
zathura = {
name = "Zathura";
exec = "${pkgs.zathura}/bin/zathura";
zathura-wrapper = {
name = "Zathura-wrapper";
exec = "st -T st-float -g 150x50 -e zathura %F";
terminal = false;
mimeType = ["application/pdf"];
};
nsxiv-wrapper = {
name = "Nsxiv-wrapper";
# 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;
mimeType = ["image/*"];
};
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;
mimeType = ["text/*"];
};
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;
mimeType = ["video/*"];
};
@ -38,7 +34,7 @@
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "zathura.desktop";
"application/pdf" = "zathura-wrapper.desktop";
# text
"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/yazi.nix
./common/optional/transmission.nix
./common/optional/desktop/common/xdg
];
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 = {
backend = "podman-socket";
projects.jellyfin = {
@ -21,6 +31,7 @@
environment = {
PUID = "1000";
PGID = "1000";
DOCKER_MODS="linuxserver/mods:jellyfin-opencl-intel";
};
devices = ["/dev/dri:/dev/dri"];
};