Skip to content

Commit d45e853

Browse files
Merge master into staging-next
2 parents bd24648 + d63af7f commit d45e853

File tree

46 files changed

+449
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+449
-144
lines changed

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14615,6 +14615,12 @@
1461514615
githubId = 5737016;
1461614616
name = "Philipp Schuster";
1461714617
};
14618+
phlip9 = {
14619+
email = "philiphayes9@gmail.com";
14620+
github = "phlip9";
14621+
githubId = 918989;
14622+
name = "Philip Hayes";
14623+
};
1461814624
Phlogistique = {
1461914625
email = "noe.rubinstein@gmail.com";
1462014626
github = "Phlogistique";

nixos/doc/manual/release-notes/rl-2405.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
5757

5858
- [ping_exporter](https://github.com/czerwonk/ping_exporter), a Prometheus exporter for ICMP echo requests. Available as [services.prometheus.exporters.ping](#opt-services.prometheus.exporters.ping.enable).
5959

60+
- [TigerBeetle](https://tigerbeetle.com/), a distributed financial accounting database designed for mission critical safety and performance. Available as [services.tigerbeetle](#opt-services.tigerbeetle.enable).
61+
6062
- [Clevis](https://github.com/latchset/clevis), a pluggable framework for automated decryption, used to unlock encrypted devices in initrd. Available as [boot.initrd.clevis.enable](#opt-boot.initrd.clevis.enable).
6163

6264
- [TuxClocker](https://github.com/Lurkki14/tuxclocker), a hardware control and monitoring program. Available as [programs.tuxclocker](#opt-programs.tuxclocker.enable).

nixos/modules/module-list.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@
446446
./services/databases/postgresql.nix
447447
./services/databases/redis.nix
448448
./services/databases/surrealdb.nix
449+
./services/databases/tigerbeetle.nix
449450
./services/databases/victoriametrics.nix
450451
./services/desktops/accountsservice.nix
451452
./services/desktops/ayatana-indicators.nix
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# TigerBeetle {#module-services-tigerbeetle}
2+
3+
*Source:* {file}`modules/services/databases/tigerbeetle.nix`
4+
5+
*Upstream documentation:* <https://docs.tigerbeetle.com/>
6+
7+
TigerBeetle is a distributed financial accounting database designed for mission critical safety and performance.
8+
9+
To enable TigerBeetle, add the following to your {file}`configuration.nix`:
10+
```
11+
services.tigerbeetle.enable = true;
12+
```
13+
14+
When first started, the TigerBeetle service will create its data file at {file}`/var/lib/tigerbeetle` unless the file already exists, in which case it will just use the existing file.
15+
If you make changes to the configuration of TigerBeetle after its data file was already created (for example increasing the replica count), you may need to remove the existing file to avoid conflicts.
16+
17+
## Configuring {#module-services-tigerbeetle-configuring}
18+
19+
By default, TigerBeetle will only listen on a local interface.
20+
To configure it to listen on a different interface (and to configure it to connect to other replicas, if you're creating more than one), you'll have to set the `addresses` option.
21+
Note that the TigerBeetle module won't open any firewall ports automatically, so if you configure it to listen on an external interface, you'll need to ensure that connections can reach it:
22+
23+
```
24+
services.tigerbeetle = {
25+
enable = true;
26+
addresses = [ "0.0.0.0:3001" ];
27+
};
28+
29+
networking.firewall.allowedTCPPorts = [ 3001 ];
30+
```
31+
32+
A complete list of options for TigerBeetle can be found [here](#opt-services.tigerbeetle.enable).
33+
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{ config, lib, pkgs, ... }:
2+
let
3+
cfg = config.services.tigerbeetle;
4+
in
5+
{
6+
meta = {
7+
maintainers = with lib.maintainers; [ danielsidhion ];
8+
doc = ./tigerbeetle.md;
9+
buildDocsInSandbox = true;
10+
};
11+
12+
options = {
13+
services.tigerbeetle = with lib; {
14+
enable = mkEnableOption (mdDoc "TigerBeetle server");
15+
16+
package = mkPackageOption pkgs "tigerbeetle" { };
17+
18+
clusterId = mkOption {
19+
type = types.either types.ints.unsigned (types.strMatching "[0-9]+");
20+
default = 0;
21+
description = lib.mdDoc ''
22+
The 128-bit cluster ID used to create the replica data file (if needed).
23+
Since Nix only supports integers up to 64 bits, you need to pass a string to this if the cluster ID can't fit in 64 bits.
24+
Otherwise, you can pass the cluster ID as either an integer or a string.
25+
'';
26+
};
27+
28+
replicaIndex = mkOption {
29+
type = types.ints.unsigned;
30+
default = 0;
31+
description = lib.mdDoc ''
32+
The index (starting at 0) of the replica in the cluster.
33+
'';
34+
};
35+
36+
replicaCount = mkOption {
37+
type = types.ints.unsigned;
38+
default = 1;
39+
description = lib.mdDoc ''
40+
The number of replicas participating in replication of the cluster.
41+
'';
42+
};
43+
44+
cacheGridSize = mkOption {
45+
type = types.strMatching "[0-9]+(K|M|G)B";
46+
default = "1GB";
47+
description = lib.mdDoc ''
48+
The grid cache size.
49+
The grid cache acts like a page cache for TigerBeetle.
50+
It is recommended to set this as large as possible.
51+
'';
52+
};
53+
54+
addresses = mkOption {
55+
type = types.listOf types.nonEmptyStr;
56+
default = [ "3001" ];
57+
description = lib.mdDoc ''
58+
The addresses of all replicas in the cluster.
59+
This should be a list of IPv4/IPv6 addresses with port numbers.
60+
Either the address or port number (but not both) may be omitted, in which case a default of 127.0.0.1 or 3001 will be used.
61+
The first address in the list corresponds to the address for replica 0, the second address for replica 1, and so on.
62+
'';
63+
};
64+
};
65+
};
66+
67+
config = lib.mkIf cfg.enable {
68+
assertions =
69+
let
70+
numAddresses = builtins.length cfg.addresses;
71+
in
72+
[
73+
{
74+
assertion = cfg.replicaIndex < cfg.replicaCount;
75+
message = "the TigerBeetle replica index must fit the configured replica count";
76+
}
77+
{
78+
assertion = cfg.replicaCount == numAddresses;
79+
message = if cfg.replicaCount < numAddresses then "TigerBeetle must not have more addresses than the configured number of replicas" else "TigerBeetle must be configured with the addresses of all replicas";
80+
}
81+
];
82+
83+
systemd.services.tigerbeetle =
84+
let
85+
replicaDataPath = "/var/lib/tigerbeetle/${builtins.toString cfg.clusterId}_${builtins.toString cfg.replicaIndex}.tigerbeetle";
86+
in
87+
{
88+
description = "TigerBeetle server";
89+
90+
wantedBy = [ "multi-user.target" ];
91+
after = [ "network.target" ];
92+
93+
preStart = ''
94+
if ! test -e "${replicaDataPath}"; then
95+
${lib.getExe cfg.package} format --cluster="${builtins.toString cfg.clusterId}" --replica="${builtins.toString cfg.replicaIndex}" --replica-count="${builtins.toString cfg.replicaCount}" "${replicaDataPath}"
96+
fi
97+
'';
98+
99+
serviceConfig = {
100+
Type = "exec";
101+
102+
DynamicUser = true;
103+
ProtectHome = true;
104+
DevicePolicy = "closed";
105+
106+
StateDirectory = "tigerbeetle";
107+
StateDirectoryMode = 700;
108+
109+
ExecStart = "${lib.getExe cfg.package} start --cache-grid=${cfg.cacheGridSize} --addresses=${lib.escapeShellArg (builtins.concatStringsSep "," cfg.addresses)} ${replicaDataPath}";
110+
};
111+
};
112+
113+
environment.systemPackages = [ cfg.package ];
114+
};
115+
}

pkgs/applications/audio/monkeys-audio/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
}:
66

77
stdenv.mkDerivation (finalAttrs: {
8-
version = "10.40";
8+
version = "10.43";
99
pname = "monkeys-audio";
1010

1111
src = fetchzip {
1212
url = "https://monkeysaudio.com/files/MAC_${
1313
builtins.concatStringsSep "" (lib.strings.splitString "." finalAttrs.version)}_SDK.zip";
14-
sha256 = "sha256-UHQSZM5AjODtgg0Pgi2N8tLKRI9Qg1CotPx2KoJk1wQ=";
14+
sha256 = "sha256-Y1X0KWf87L8Qjx/G6/RV37iiN7enwXTAaqQ+45FfTT4=";
1515
stripRoot = false;
1616
};
1717
nativeBuildInputs = [

pkgs/applications/audio/snapcast/default.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
1+
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config
22
, alsa-lib, asio, avahi, boost179, flac, libogg, libvorbis, soxr
33
, IOKit, AudioToolbox
44
, aixlog, popl
@@ -18,6 +18,15 @@ stdenv.mkDerivation rec {
1818
sha256 = "sha256-dlK1xQQqst4VQjioC7MZzqXwMC+JfqtvnD5lrOqGhYI=";
1919
};
2020

21+
patches = [
22+
# Can be removed with next release after 0.27.0
23+
(fetchpatch {
24+
name = "include-cstdint.patch";
25+
url = "https://github.com/badaix/snapcast/commit/481f08199ca31c60c9a3475f1064e6b06a503d12.patch";
26+
hash = "sha256-klpvmBpBAlBMtcgnNfW6X6vDbJFnOuOsPUDXcNf5tGc=";
27+
})
28+
];
29+
2130
nativeBuildInputs = [ cmake pkg-config ];
2231
# snapcast also supports building against tremor but as we have libogg, that's
2332
# not needed

pkgs/applications/audio/sonobus/default.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
, webkitgtk
2020
}:
2121

22-
stdenv.mkDerivation rec {
22+
stdenv.mkDerivation (finalAttrs: {
2323
pname = "sonobus";
24-
version = "1.7.0";
24+
version = "1.7.2";
2525

2626
src = fetchFromGitHub {
2727
owner = "sonosaurus";
2828
repo = "sonobus";
29-
rev = version;
30-
sha256 = "sha256-zOPQK5X1E6t53DOjV7qSelyep4+m9aL4tRHqwyeuFQA=";
29+
rev = finalAttrs.version;
30+
hash = "sha256-NOdmHFKrV7lb8XbeG5GdLKYZ0c/vcz3fcqYj9JvE+/Q=";
3131
fetchSubmodules = true;
3232
};
3333

@@ -56,6 +56,9 @@ stdenv.mkDerivation rec {
5656
libXrandr
5757
];
5858

59+
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-rpath ${lib.makeLibraryPath (finalAttrs.runtimeDependencies)}";
60+
dontPatchELF = true; # needed or nix will try to optimize the binary by removing "useless" rpath
61+
5962
postPatch = lib.optionalString (stdenv.isLinux) ''
6063
# needs special setup on Linux, dunno if it can work on Darwin
6164
# https://github.com/NixOS/nixpkgs/issues/19098
@@ -80,4 +83,4 @@ stdenv.mkDerivation rec {
8083
platforms = platforms.unix;
8184
broken = stdenv.isDarwin;
8285
};
83-
}
86+
})
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
diff -Naur source-old/ruby/GNUmakefile source-new/ruby/GNUmakefile
2-
--- source-old/ruby/GNUmakefile 1969-12-31 21:00:01.000000000 -0300
3-
+++ source-new/ruby/GNUmakefile 2022-11-13 22:43:09.700197748 -0300
4-
@@ -11,17 +11,9 @@
5-
ruby += audio.openal
6-
ruby += input.quartz #input.carbon
2+
--- source-old/ruby/GNUmakefile 2024-01-23 16:12:41.009951705 +0000
3+
+++ source-new/ruby/GNUmakefile 2024-01-23 16:13:54.619174062 +0000
4+
@@ -29,20 +29,9 @@
5+
ruby += input.sdl
6+
endif
77
else ifeq ($(platform),linux)
8-
- pkg_check = $(if $(shell pkg-config $1 && echo 1),$2)
8+
- pkg_check = $(if $(shell $(pkg_config) $1 && echo 1),$2)
99
- ruby += video.glx video.glx2 video.xshm
1010
- ruby += $(call pkg_check,xv,video.xvideo)
1111
- ruby += audio.oss audio.alsa
@@ -15,10 +15,13 @@ diff -Naur source-old/ruby/GNUmakefile source-new/ruby/GNUmakefile
1515
- ruby += $(call pkg_check,ao,audio.ao)
1616
- ruby += input.xlib
1717
- ruby += $(call pkg_check,libudev,input.udev)
18-
- ruby += $(call pkg_check,sdl2,input.sdl)
18+
- ifeq ($(sdl2),true)
19+
- ruby += $(call pkg_check,sdl2,input.sdl)
20+
- ruby += $(call pkg_check,sdl2,audio.sdl)
21+
- endif
1922
+ ruby += video.glx video.glx2 video.xshm video.xvideo
2023
+ ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao
2124
+ ruby += input.xlib input.udev input.sdl
2225
else ifeq ($(platform),bsd)
23-
pkg_check = $(if $(shell pkg-config $1 && echo 1),$2)
26+
pkg_check = $(if $(shell $(pkg_config) $1 && echo 1),$2)
2427
ruby += video.glx video.glx2 video.xshm

pkgs/applications/emulators/bsnes/ares/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
stdenv.mkDerivation (finalAttrs: {
2424
pname = "ares";
25-
version = "133";
25+
version = "135";
2626

2727
src = fetchFromGitHub {
2828
owner = "ares-emulator";
2929
repo = "ares";
3030
rev = "v${finalAttrs.version}";
31-
hash = "sha256-KCpHiIdid5h5CU2uyMOo+p5h50h3Ki5/4mUpdTAPKQA=";
31+
hash = "sha256-SZhsMKjNxmT2eHsXAZcyMGoMhwWGgvXpDeZGGVn58Sc=";
3232
};
3333

3434
patches = [

0 commit comments

Comments
 (0)