7 Commits

Author SHA1 Message Date
14d8f23d54 hosts/vps1: add route for skycam
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m19s
2025-06-23 18:43:22 +01:00
47bcec6b0d flake.lock: Update
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m47s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/7f1857b31522062a6a00f88cbccf86b43acceed1?narHash=sha256-KrC9iOVYIn6ukpVlHbqSA4hYCZ6oDyJKrcLqv4c5v84%3D' (2025-06-16)
  → 'github:nix-community/disko/8fd2d6c75009ac75f9a6fb18c33a239806778d01?narHash=sha256-kD88T/NqmcgfOBFAwphN30ccaUdj6K6%2BLG0XdM2w2LA%3D' (2025-06-23)
• Updated input 'hyprland':
    'github:hyprwm/Hyprland/8b1d5560cf1ca2c4c2624914de284d315502a092?narHash=sha256-a6SN50G3JLZV7OQoQL9O7vNFVO9uR9/2arJcqUpI4EU%3D' (2025-06-21)
  → 'github:hyprwm/Hyprland/cf7e3aa448f8c9e0d9e8f407e6ed730da55acc69?narHash=sha256-uxIwiV1p2SVNIoP%2BoD025lZKfq4zNn7CmdaYVoskqnQ%3D' (2025-06-23)
• Updated input 'hyprland-plugins':
    'github:hyprwm/hyprland-plugins/8b4405ab46cafc471d5b09ff7258676dc9aaca59?narHash=sha256-/qnR7/GvGP1cGtOOm4OGJRtkVejn75/jsvJpiqE1ZDk%3D' (2025-06-21)
  → 'github:hyprwm/hyprland-plugins/132e610b6526820fa1bcf33588be11538fb92ca7?narHash=sha256-ZA00aPfBtrSTz6UsZ6uoBfy2UYi49A9XpxxyKUjbQ2A%3D' (2025-06-23)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/08f22084e6085d19bcfb4be30d1ca76ecb96fe54?narHash=sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50%3D' (2025-06-19)
  → 'github:NixOS/nixpkgs/4206c4cb56751df534751b058295ea61357bbbaa?narHash=sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc%3D' (2025-06-21)
• Updated input 'pre-commit-hooks':
    'github:cachix/git-hooks.nix/623c56286de5a3193aa38891a6991b28f9bab056?narHash=sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4%3D' (2025-06-11)
  → 'github:cachix/git-hooks.nix/fae816c55a75675f30d18c9cbdecc13b970d95d4?narHash=sha256-uLtw0iF9mQ94L831NOlQLPX9wm0qzd5yim3rcwACEoM%3D' (2025-06-23)
2025-06-23 17:22:41 +01:00
fb15ef954b hosts/pi: add snapcast
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m15s
2025-06-22 23:03:31 +01:00
6a8016dd66 home-assistant: configure onkyo in UI
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m15s
2025-06-22 20:43:46 +01:00
8a110a8f30 pkgs/streamrip: remove
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s
2025-06-22 18:18:03 +01:00
c71208da11 open-webui: backup private directory
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m16s
2025-06-22 18:03:52 +01:00
c1ded6c3ce hosts/skycam: backup skycam-archiver directory 2025-06-22 18:02:32 +01:00
9 changed files with 75 additions and 124 deletions

38
flake.lock generated
View File

@ -119,11 +119,11 @@
]
},
"locked": {
"lastModified": 1750040002,
"narHash": "sha256-KrC9iOVYIn6ukpVlHbqSA4hYCZ6oDyJKrcLqv4c5v84=",
"lastModified": 1750680230,
"narHash": "sha256-kD88T/NqmcgfOBFAwphN30ccaUdj6K6+LG0XdM2w2LA=",
"owner": "nix-community",
"repo": "disko",
"rev": "7f1857b31522062a6a00f88cbccf86b43acceed1",
"rev": "8fd2d6c75009ac75f9a6fb18c33a239806778d01",
"type": "github"
},
"original": {
@ -475,11 +475,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1750525408,
"narHash": "sha256-a6SN50G3JLZV7OQoQL9O7vNFVO9uR9/2arJcqUpI4EU=",
"lastModified": 1750681989,
"narHash": "sha256-uxIwiV1p2SVNIoP+oD025lZKfq4zNn7CmdaYVoskqnQ=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "8b1d5560cf1ca2c4c2624914de284d315502a092",
"rev": "cf7e3aa448f8c9e0d9e8f407e6ed730da55acc69",
"type": "github"
},
"original": {
@ -505,11 +505,11 @@
]
},
"locked": {
"lastModified": 1750503578,
"narHash": "sha256-/qnR7/GvGP1cGtOOm4OGJRtkVejn75/jsvJpiqE1ZDk=",
"lastModified": 1750682153,
"narHash": "sha256-ZA00aPfBtrSTz6UsZ6uoBfy2UYi49A9XpxxyKUjbQ2A=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "8b4405ab46cafc471d5b09ff7258676dc9aaca59",
"rev": "132e610b6526820fa1bcf33588be11538fb92ca7",
"type": "github"
},
"original": {
@ -823,11 +823,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1750365781,
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
"lastModified": 1750506804,
"narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
"rev": "4206c4cb56751df534751b058295ea61357bbbaa",
"type": "github"
},
"original": {
@ -962,11 +962,11 @@
]
},
"locked": {
"lastModified": 1749636823,
"narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=",
"lastModified": 1750684550,
"narHash": "sha256-uLtw0iF9mQ94L831NOlQLPX9wm0qzd5yim3rcwACEoM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "623c56286de5a3193aa38891a6991b28f9bab056",
"rev": "fae816c55a75675f30d18c9cbdecc13b970d95d4",
"type": "github"
},
"original": {
@ -1000,11 +1000,11 @@
"secrets": {
"flake": false,
"locked": {
"lastModified": 1750597864,
"narHash": "sha256-0RJ4opKFAFftQo+E68ZuDZK66UxFlRYVYlYyYCa3u+M=",
"lastModified": 1750611706,
"narHash": "sha256-bKhQ+lAaNtfpTUR3fysCdbnMfYT5PJ4diiM9EkHMdHI=",
"ref": "refs/heads/master",
"rev": "b6a77c1782d3e5a65849e2ccf844384155f006be",
"revCount": 33,
"rev": "ae16fda90546dde6c014a4f91a5443bce4dce234",
"revCount": 34,
"type": "git",
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
},

View File

@ -33,6 +33,6 @@
};
modules.services.borgmatic.directories = [
config.services.open-webui.stateDir
"/var/lib/private/open-webui"
];
}

View File

@ -9,6 +9,7 @@
inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix
./home-assistant
./snapcast.nix
../server.nix
];

View File

@ -63,7 +63,6 @@
};
media_player = [ ];
mobile_app = { };
onkyo = { };
open_meteo = { };
recorder = {
purge_keep_days = 365;

43
hosts/pi/snapcast.nix Normal file
View File

@ -0,0 +1,43 @@
{
pkgs,
...
}:
{
# Put all sinks in pipewire group
services.pipewire.systemWide = true;
services.avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
domain = true;
addresses = true;
};
};
services.snapserver = {
enable = true;
streams = {
default = {
type = "file";
location = "/var/lib/snapserver/test.wav";
sampleFormat = "44100:16:2";
codec = "flac";
};
};
};
systemd.services.snapclient = {
wantedBy = [ "multi-user.target" ];
after = [ "pipewire.service" ];
requires = [ "pipewire.service" ];
description = "Snapcast client";
serviceConfig = {
ExecStart = "${pkgs.snapcast}/bin/snapclient -h 127.0.0.1 --player pulse --mixer hardware";
DynamicUser = true;
SupplementaryGroups = [ "pipewire" ];
};
};
}

View File

@ -58,6 +58,14 @@
};
};
modules.services.borgmatic = {
enable = true;
directories = [
"/var/lib/skycam-archiver"
];
repoPath = "ssh://m94ekv2i@m94ekv2i.repo.borgbase.com/./repo";
};
environment.systemPackages = with pkgs; [
git
neovim

View File

@ -136,6 +136,9 @@ in
enableACME = true;
serverAliases = [ "www.jdholt.com" ];
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
locations."/skycam" = {
root = "/var/www/jdholt.com";
};
locations."/skycam/snapshot.jpg" = {
extraConfig = ''
set $backend "skycam.mesh.vimium.net:1984";

View File

@ -1,25 +0,0 @@
From 18efb9b5c8e562b169425f6ba79977e52e8b91b9 Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <paveloomm@gmail.com>
Date: Sat, 13 Jan 2024 12:49:45 +0000
Subject: [PATCH] Ensure the default config file is writable.
---
streamrip/config.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/streamrip/config.py b/streamrip/config.py
index 7ee2f57..88a5fef 100644
--- a/streamrip/config.py
+++ b/streamrip/config.py
@@ -378,6 +378,9 @@ def set_user_defaults(path: str, /):
"""Update the TOML file at the path with user-specific default values."""
shutil.copy(BLANK_CONFIG_PATH, path)
+ # Ensure the default config file is writable
+ os.chmod(path, 0o644)
+
with open(path) as f:
toml = parse(f.read())
toml["downloads"]["folder"] = DEFAULT_DOWNLOADS_FOLDER # type: ignore
--
2.42.0

View File

@ -1,78 +0,0 @@
{
lib,
python3Packages,
fetchFromGitHub,
ffmpeg,
}:
python3Packages.buildPythonApplication {
pname = "streamrip";
version = "2.0.7";
pyproject = true;
src = fetchFromGitHub {
owner = "nathom";
repo = "streamrip";
rev = "46b570dbb6f81d604cbaa3bfa379463e0a20a841";
hash = "sha256-LD99OjguaBnrQxCwmCeHvmBMq5aOfobwnMd5/aCRZW8=";
};
patches = [
./ensure-the-default-config-file-is-writable.patch
];
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = with python3Packages; [
aiodns
aiofiles
aiohttp
aiolimiter
appdirs
cleo
click-help-colors
deezer-py
m3u8
mutagen
pathvalidate
pillow
pycryptodomex
pytest-asyncio
pytest-mock
rich
simple-term-menu
tomlkit
tqdm
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
prePatch = ''
sed -i 's#aiofiles = ".*"#aiofiles = "*"#' pyproject.toml
sed -i 's#deezer-py = ".*"#deezer-py = "*"#' pyproject.toml
sed -i 's#m3u8 = ".*"#m3u8 = "*"#' pyproject.toml
sed -i 's#pathvalidate = ".*"#pathvalidate = "*"#' pyproject.toml
sed -i 's#Pillow = ".*"#Pillow = "*"#' pyproject.toml
sed -i 's#pytest-asyncio = ".*"#pytest-asyncio = "*"#' pyproject.toml
sed -i 's#tomlkit = ".*"#tomlkit = "*"#' pyproject.toml
sed -i 's#"ffmpeg"#"${lib.getBin ffmpeg}/bin/ffmpeg"#g' streamrip/client/downloadable.py
'';
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = with lib; {
description = "Scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer";
homepage = "https://github.com/nathom/streamrip";
license = licenses.gpl3Only;
maintainers = with maintainers; [ paveloom ];
mainProgram = "rip";
};
}