Merge master into staging-next

This commit is contained in:
nixpkgs-ci[bot]
2026-02-18 18:16:20 +00:00
committed by GitHub
23 changed files with 469 additions and 34 deletions
+1
View File
@@ -1724,6 +1724,7 @@
./services/web-apps/peertube.nix
./services/web-apps/pgpkeyserver-lite.nix
./services/web-apps/photoprism.nix
./services/web-apps/photoview.nix
./services/web-apps/phylactery.nix
./services/web-apps/pict-rs.nix
./services/web-apps/pihole-web.nix
@@ -0,0 +1,259 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.photoview;
dbUrl = {
sqlite = "PHOTOVIEW_SQLITE_PATH=${cfg.dataDir}/photoview.db";
mysql = "PHOTOVIEW_MYSQL_URL=${cfg.database.user}:$(cat $CREDENTIALS_DIRECTORY/db_password)@tcp(${cfg.database.host}:${toString cfg.database.port})/${cfg.database.name}";
postgres = "PHOTOVIEW_POSTGRES_URL=postgres://${cfg.database.user}:$(cat $CREDENTIALS_DIRECTORY/db_password)@${cfg.database.host}:${toString cfg.database.port}/${cfg.database.name}";
};
in
{
options.services.photoview = {
enable = lib.mkEnableOption "Photoview, a photo gallery for self-hosted personal servers";
package = lib.mkPackageOption pkgs "photoview" { };
user = lib.mkOption {
type = lib.types.str;
default = "photoview";
description = "User account under which photoview runs.";
};
group = lib.mkOption {
type = lib.types.str;
default = "photoview";
description = "Group under which photoview runs.";
};
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/photoview";
description = "Directory for photoview state, cache, and database.";
};
mediaPath = lib.mkOption {
type = lib.types.path;
description = ''
Path to the directory containing photos to be served.
This directory must be readable by the photoview user.
'';
example = "/mnt/photos";
};
host = lib.mkOption {
type = lib.types.str;
default = "127.0.0.1";
description = "Address to listen on.";
};
port = lib.mkOption {
type = lib.types.port;
default = 4001;
description = "Port to listen on.";
};
database = {
type = lib.mkOption {
type = lib.types.enum [
"sqlite"
"mysql"
"postgres"
];
default = "sqlite";
description = "Database engine to use.";
};
host = lib.mkOption {
type = lib.types.str;
default = "localhost";
description = "Database host address.";
};
port = lib.mkOption {
type = lib.types.port;
default = 5432;
description = "Database port.";
};
name = lib.mkOption {
type = lib.types.str;
default = "photoview";
description = "Database name.";
};
user = lib.mkOption {
type = lib.types.str;
default = "photoview";
description = "Database user.";
};
passwordFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
Path to a file containing the database password.
Required when using MySQL or PostgreSQL.
'';
};
};
settings = {
disableFaceRecognition = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Disable face recognition feature.";
};
disableVideoEncoding = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Disable video encoding with FFmpeg.";
};
disableRawProcessing = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Disable RAW photo processing.";
};
mapboxToken = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Mapbox API token for map features.";
};
videoEncoder = lib.mkOption {
type = lib.types.nullOr (
lib.types.enum [
"h264_qsv"
"h264_vaapi"
"h264_nvenc"
]
);
default = null;
description = "Hardware video encoder to use.";
};
};
secretsFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
Path to an environment file containing secrets.
Can be used for MAPBOX_TOKEN or other sensitive settings.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.database.type == "sqlite" || cfg.database.passwordFile != null;
message = "services.photoview.database.passwordFile must be set when using MySQL or PostgreSQL.";
}
];
users.users = lib.mkIf (cfg.user == "photoview") {
photoview = {
group = cfg.group;
home = cfg.dataDir;
isSystemUser = true;
};
};
users.groups = lib.mkIf (cfg.group == "photoview") {
photoview = { };
};
systemd.services.photoview = {
description = "Photoview - Photo gallery for self-hosted personal servers";
documentation = [ "https://photoview.github.io/docs/" ];
wantedBy = [ "multi-user.target" ];
after = [
"network.target"
]
++ lib.optional (cfg.database.type == "postgres") "postgresql.service"
++ lib.optional (cfg.database.type == "mysql") "mysql.service";
requires =
lib.optional (cfg.database.type == "postgres") "postgresql.service"
++ lib.optional (cfg.database.type == "mysql") "mysql.service";
environment = {
PHOTOVIEW_DATABASE_DRIVER = cfg.database.type;
PHOTOVIEW_LISTEN_IP = cfg.host;
PHOTOVIEW_LISTEN_PORT = toString cfg.port;
PHOTOVIEW_MEDIA_CACHE = "/var/cache/photoview";
PHOTOVIEW_DISABLE_FACE_RECOGNITION = toString cfg.settings.disableFaceRecognition;
PHOTOVIEW_DISABLE_VIDEO_ENCODING = toString cfg.settings.disableVideoEncoding;
PHOTOVIEW_DISABLE_RAW_PROCESSING = toString cfg.settings.disableRawProcessing;
}
// lib.optionalAttrs (cfg.settings.mapboxToken != null) {
MAPBOX_TOKEN = cfg.settings.mapboxToken;
}
// lib.optionalAttrs (cfg.settings.videoEncoder != null) {
PHOTOVIEW_VIDEO_ENCODER = cfg.settings.videoEncoder;
};
script = ''
export ${dbUrl.${cfg.database.type}}
exec ${lib.getExe cfg.package}
'';
serviceConfig = {
User = cfg.user;
Group = cfg.group;
StateDirectory = "photoview";
StateDirectoryMode = "0750";
CacheDirectory = "photoview";
CacheDirectoryMode = "0750";
WorkingDirectory = cfg.dataDir;
Restart = "on-failure";
RestartSec = 5;
# Read access to media directory
ReadOnlyPaths = [ cfg.mediaPath ];
# Secrets
LoadCredential = lib.optional (
cfg.database.passwordFile != null
) "db_password:${cfg.database.passwordFile}";
EnvironmentFile = lib.optional (cfg.secretsFile != null) cfg.secretsFile;
# Hardening
CapabilityBoundingSet = "";
LockPersonality = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
UMask = "0077";
};
};
};
meta.maintainers = with lib.maintainers; [ nettika ];
}
+3 -3
View File
@@ -21,13 +21,13 @@
buildNpmPackage rec {
pname = "bruno";
version = "3.0.2";
version = "3.1.1";
src = fetchFromGitHub {
owner = "usebruno";
repo = "bruno";
tag = "v${version}";
hash = "sha256-lvv1SJuUxNwukg/yi6mhgvVs8M/Eyf2H36NJN+6XKSE=";
hash = "sha256-XoGD8lDc6QGka17KTvVX3gEj1fo+4NWpUM8mLA5F+i4=";
postFetch = ''
${lib.getExe npm-lockfile-fix} $out/package-lock.json
@@ -36,7 +36,7 @@ buildNpmPackage rec {
nodejs = nodejs_22;
npmDepsHash = "sha256-zb0oP4/L7449z83tpcT6W/6sXS4Urph3ELN9kUC32dA=";
npmDepsHash = "sha256-XJsQFyi448yoRM8pUvaNpGDIZ41q0vpwYTgJufBBu1g=";
npmFlags = [ "--legacy-peer-deps" ];
nativeBuildInputs = [
+2 -2
View File
@@ -8,13 +8,13 @@
}:
buildGoModule (finalAttrs: {
pname = "cocoon";
version = "0.8.4";
version = "0.8.5";
src = fetchFromGitHub {
owner = "haileyok";
repo = "cocoon";
tag = "v${finalAttrs.version}";
hash = "sha256-xXXHJcI3icsCeOeI+6L/waK3+UtjhBZosQPLoGN1TiY=";
hash = "sha256-2+K4KiF0N+Y+J5dS4xQZuYlxr6OYzNloVXjxyGnEHh4=";
};
ldflags = [
+3 -3
View File
@@ -11,18 +11,18 @@
buildGoModule (finalAttrs: {
pname = "go-musicfox";
version = "4.7.2";
version = "4.8.0";
src = fetchFromGitHub {
owner = "go-musicfox";
repo = "go-musicfox";
rev = "v${finalAttrs.version}";
hash = "sha256-RJPb+aZawU22HBXTfr7+TP0ocFsNrP1mOHvHPRm2RnA=";
hash = "sha256-9OQTwyEGuHOMM5LgL6Y5zVavNnQhzJSZZu4ABhr0rds=";
};
deleteVendor = true;
vendorHash = "sha256-KQp22eF48jhhCSZA/1weWVavyP3be4j4mOPM5EPssGs=";
vendorHash = "sha256-MEcdWJts7hzt8fuhVsxHl1mQ57R8vNd3H3Tmpx4A9a4=";
subPackages = [ "cmd/musicfox.go" ];
+2 -1
View File
@@ -104,7 +104,8 @@ let
);
in
symlinkJoin {
name = "mpv-with-scripts-${mpv-unwrapped.version}";
pname = "mpv-with-scripts";
inherit (mpv-unwrapped) version;
# TODO: don't link all mpv outputs
paths = [ mpv-unwrapped.all ];
+2 -2
View File
@@ -10,13 +10,13 @@
buildGoModule (finalAttrs: {
pname = "myks";
version = "5.8.1";
version = "5.9.1";
src = fetchFromGitHub {
owner = "mykso";
repo = "myks";
tag = "v${finalAttrs.version}";
hash = "sha256-OzxghyobV91jEbSNTC+Cc9vZt5V+RLTltUajedzv5zw=";
hash = "sha256-8vHDWex+xv9E+MYh2FFWj34WJhmfLr+eioVzAm50/TI=";
};
vendorHash = "sha256-b1uLNz8dSJnJ0tevdm79x9YVas+Wh9//4o+k6fEckZA=";
@@ -14,13 +14,13 @@ assert
buildGoModule (finalAttrs: {
pname = "open-policy-agent";
version = "1.13.1";
version = "1.13.2";
src = fetchFromGitHub {
owner = "open-policy-agent";
repo = "opa";
tag = "v${finalAttrs.version}";
hash = "sha256-MBfzoaIZY3u4PtchCzquhrkasjwnARag/UCc5JBTfmw=";
hash = "sha256-dQtDFk8Qessso37fjH56xeTNPs9r8WF8YJpkV1tS7U4=";
};
vendorHash = "sha256-Jn0vi1Ihyeog/LaUcuu/V9dd8l9LSdRSbtH1GPJrT50=";
+4 -4
View File
@@ -8,13 +8,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "open62541pp";
version = "0.20.0";
version = "0.21.0";
src = fetchFromGitHub {
owner = "open62541pp";
repo = "open62541pp";
rev = "v${finalAttrs.version}";
hash = "sha256-sHB6LLDpg+oA8W2jeIHMTC7YSI2ipUm8LvtNszhbT+c=";
tag = "v${finalAttrs.version}";
hash = "sha256-mxrAJjOwRZ85zy6zE0P4z+ToTK3goRZv0xKimUjA69M=";
};
cmakeFlags = [
@@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "C++ wrapper of the open62541 OPC UA library";
homepage = "https://open62541pp.github.io/open62541pp";
changelog = "https://github.com/open62541pp/open62541pp/releases/tag/${finalAttrs.src.rev}";
changelog = "https://github.com/open62541pp/open62541pp/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ sikmir ];
platforms = lib.platforms.unix;
+81
View File
@@ -0,0 +1,81 @@
{
lib,
buildGoModule,
fetchFromGitHub,
callPackage,
makeWrapper,
pkg-config,
# Native dependencies for image processing and face recognition
dlib,
libjpeg,
libheif,
blas,
lapack,
# Runtime dependencies
exiftool,
darktable,
ffmpeg,
}:
buildGoModule (finalAttrs: {
pname = "photoview";
version = "2.4.0";
src = fetchFromGitHub {
owner = "photoview";
repo = "photoview";
rev = "v${finalAttrs.version}";
hash = "sha256-ZfvBdQlyqONsrviZGL22Kt+AiPaVWwdoREDUrHDYyIs=";
};
vendorHash = "sha256-Tn4OxSV41s/4n2Q3teJRJNc39s6eKW4xE9wW/CIR5Fg=";
modRoot = "api";
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [
dlib
libjpeg
libheif
blas
lapack
];
postInstall = ''
# Install face recognition models
mkdir -p $out/share/photoview
cp -r ${finalAttrs.src}/api/data $out/share/photoview/
# Symlink the UI
ln -s ${finalAttrs.passthru.ui} $out/share/photoview/ui
# Rename binary and wrap with runtime dependencies
mv $out/bin/api $out/bin/photoview
wrapProgram $out/bin/photoview \
--set PHOTOVIEW_FACE_RECOGNITION_MODELS_PATH $out/share/photoview/data/models \
--set PHOTOVIEW_UI_PATH $out/share/photoview/ui \
--set PHOTOVIEW_SERVE_UI 1 \
--prefix PATH : ${
lib.makeBinPath [
exiftool
darktable
ffmpeg
]
}
'';
passthru.ui = callPackage ./ui.nix { inherit (finalAttrs) src version; };
meta = {
description = "Photo gallery for self-hosted personal servers";
homepage = "https://photoview.github.io/";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ nettika ];
mainProgram = "photoview";
platforms = lib.platforms.linux;
};
})
+32
View File
@@ -0,0 +1,32 @@
{
src,
version,
lib,
buildNpmPackage,
}:
buildNpmPackage {
pname = "photoview-ui";
inherit version;
src = "${src}/ui";
npmDepsHash = "sha256-wUbfq+7SuJUBxfy9TxHVda8A0g4mmYCbzJT64XBN2mI=";
NODE_ENV = "production";
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r dist/* $out/
runHook postInstall
'';
meta = {
description = "Web UI for Photoview photo gallery";
homepage = "https://photoview.github.io/";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ nettika ];
platforms = lib.platforms.all;
};
}
@@ -23,6 +23,8 @@ let
tag = version;
hash = "sha256-l5pEhv8D6jRlU24SlsGQEkXda/b7KUdP9mAqrZCbl38=";
};
propagatedBuildInputs = with python3.pkgs; [ packaging ];
});
};
};
@@ -36,14 +36,14 @@ let
in
buildPythonPackage rec {
pname = "pypdfium2";
version = "5.3.0";
version = "5.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pypdfium2-team";
repo = "pypdfium2";
tag = version;
hash = "sha256-HXJv7GCb+r1rE9Jh0wHm/LCfr8eHJA7qtCk0YhbE+24=";
hash = "sha256-QO2q1KNfFtubcJOXZaSfN30Udo14LKwVq8JqD/GOhao=";
};
build-system = [
@@ -2434,11 +2434,10 @@
};
};
sshclientconfig = {
version = "0-unstable-2025-12-19";
url = "github:metio/tree-sitter-ssh-client-config";
rev = "9c86b2af6d8f9fd0a82edcc253b45c3e8eb93c52";
hash = "sha256-YF+iMd0F1po0j8FqBO36P6DCpMgscT6YkVMOKetAS6w=";
sshclientconfig = rec {
version = "2026.2.18";
url = "github:metio/tree-sitter-ssh-client-config?ref=${version}";
hash = "sha256-zEQ9jof8CMx6YtzU+y/GnBeI7htv9EbUHtAKSmX6c3M=";
meta = {
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [
+2 -2
View File
@@ -7,13 +7,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tt-kmd";
version = "2.6.0";
version = "2.7.0";
src = fetchFromGitHub {
owner = "tenstorrent";
repo = "tt-kmd";
tag = "ttkmd-${finalAttrs.version}";
hash = "sha256-MCfz5c42Jtm/SoTjyD+P5DgSzJy0T/VpwShuJNyPyTM=";
hash = "sha256-+4Wqj91EsPthKQXajiDd9Y77oTp9BNqCgFCQrTAp6ag=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
@@ -7,13 +7,13 @@
buildHomeAssistantComponent rec {
owner = "iprak";
domain = "sensi";
version = "2.1.2";
version = "2.1.3";
src = fetchFromGitHub {
inherit owner;
repo = domain;
tag = "v${version}";
hash = "sha256-B55gFiSdWRnFMIs8vbL/euvtRcJNb5ue21RE3W5f7Ic=";
hash = "sha256-dyA4L/2FjyI4BM3IZHKE4UD+jUbrNs5dGKZGD1a1duY=";
};
postPatch = ''
@@ -222,14 +222,14 @@ lib.makeExtensible (
nixComponents_git =
(nixDependencies.callPackage ./modular/packages.nix rec {
version = "2.34pre20251217_${lib.substring 0 8 src.rev}";
version = "2.34pre20260217_${lib.substring 0 8 src.rev}";
inherit teams;
otherSplices = generateSplicesForNixComponents "nixComponents_git";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "b6add8dcc6f4f6feb1ce83aaffe4d7e660e6f616";
hash = "sha256-2au7PdQ4HXSuktTPCtOJoD/LNjqMwbHIJmuzEYW1b7I=";
rev = "6e725093e6d4dda4f6bdbab20ea3e9e9687225ec";
hash = "sha256-dhPINhGyN3N+3zMSdM51DRTEKCPGCNO3+QsbhD0/nFc=";
};
}).appendPatches
patches_common;
@@ -370,6 +370,7 @@ in
nix-cmd = callPackage ../src/libcmd/package.nix { };
nix-cli = callPackage ../src/nix/package.nix { };
${whenAtLeast "2.34pre" "nix-nswrapper"} = callPackage ../src/nswrapper/package.nix { };
nix-functional-tests = callPackage ../tests/functional/package.nix { };
@@ -35,6 +35,8 @@
nix-cli,
nix-nswrapper ? null,
nix-functional-tests,
nix-manual,
@@ -177,6 +179,9 @@ stdenv.mkDerivation (finalAttrs: {
# Forwarded outputs
ln -sT ${nix-manual} $doc
ln -sT ${nix-manual.man} $man
''
+ lib.optionalString (stdenv.isLinux && lib.versionAtLeast version "2.34pre") ''
lndir ${nix-nswrapper} $out
'';
passthru = {
@@ -8,6 +8,8 @@
rapidcheck,
gtest,
# Configuration Options
version,
@@ -24,7 +26,8 @@ mkMesonLibrary (finalAttrs: {
nix-store
nix-store-c
rapidcheck
];
]
++ lib.optional (lib.versionAtLeast version "2.34pre") gtest;
mesonFlags = [
];
@@ -10,6 +10,8 @@
nix-store-test-support,
sqlite,
openssl,
rapidcheck,
gtest,
runCommand,
@@ -60,7 +62,10 @@ mkMesonExecutable (finalAttrs: {
runCommand "${finalAttrs.pname}-run"
{
meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages;
buildInputs = [ writableTmpDirAsHomeHook ];
buildInputs = [
writableTmpDirAsHomeHook
]
++ lib.optional (lib.versionAtLeast version "2.34pre") openssl;
}
''
export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"}
@@ -8,6 +8,7 @@
nix-util,
boost,
curl,
cmake,
aws-c-common,
aws-sdk-cpp,
aws-crt-cpp,
@@ -35,7 +36,9 @@ mkMesonLibrary (finalAttrs: {
workDir = ./.;
nativeBuildInputs = lib.optional embeddedSandboxShell unixtools.hexdump;
nativeBuildInputs =
lib.optional embeddedSandboxShell unixtools.hexdump
++ lib.optional (withAWS && lib.versionAtLeast version "2.34pre") cmake;
buildInputs = [
boost
@@ -0,0 +1,43 @@
{
lib,
mkMesonExecutable,
nix-util,
# Configuration Options
version,
}:
let
inherit (lib) fileset;
in
mkMesonExecutable (finalAttrs: {
pname = "nix-nswrapper";
inherit version;
workDir = ./.;
fileset = fileset.unions [
../../nix-meson-build-support
./nix-meson-build-support
../../.version
./.version
./meson.build
(fileset.fileFilter (file: file.hasExt "cc") ./.)
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
buildInputs = [
nix-util
];
mesonFlags = [
];
meta = {
mainProgram = "nix-nswrapper";
platforms = lib.platforms.linux;
};
})