Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 4, 2025
2 parents b51e6f3 + 8f3e1f8 commit de20e4b
Show file tree
Hide file tree
Showing 142 changed files with 881 additions and 7,911 deletions.
15 changes: 10 additions & 5 deletions nixos/doc/manual/development/unit-handling.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ checks:
before the activation script is run. This behavior is different when the
service is socket-activated, as outlined in the following steps.

- The last thing that is taken into account is whether the unit is a service
and socket-activated. If `X-StopIfChanged` is **not** set, the service
is **restart**ed with the others. If it is set, both the service and the
socket are **stop**ped and the socket is **start**ed, leaving socket
activation to start the service when it's needed.
- The last thing that is taken into account is whether the unit is a
service and socket-activated. A correspondence between a
`.service` and its `.socket` unit is detected automatically, but
services can **opt out** of that detection by setting
`X-NotSocketActivated` to `yes` in their `[Service]`
section. Otherwise, if `X-StopIfChanged` is **not** set, the
service is **restart**ed with the others. If it is set, both the
service and the socket are **stop**ped and the socket is
**start**ed, leaving socket activation to start the service when
it's needed.

## Sysinit reactivation {#sec-sysinit-reactivation}

Expand Down
3 changes: 3 additions & 0 deletions nixos/lib/systemd-lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ in rec {
'' else "")
+ optionalString (def ? stopIfChanged && !def.stopIfChanged) ''
X-StopIfChanged=false
''
+ optionalString (def ? notSocketActivated && def.notSocketActivated) ''
X-NotSocketActivated=true
'' + attrsToSection def.serviceConfig);
};

Expand Down
12 changes: 12 additions & 0 deletions nixos/lib/systemd-unit-options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,18 @@ in rec {
'';
};

notSocketActivated = mkOption {
type = types.bool;
default = false;
description = ''
If set, a changed unit is never assumed to be
socket-activated on configuration switch, even if
it might have associated socket units. Instead, the unit
will be restarted (or stopped/started) as if it had no
associated sockets.
'';
};

startAt = mkOption {
type = with types; either str (listOf str);
default = [];
Expand Down
8 changes: 4 additions & 4 deletions nixos/modules/services/hardware/udev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,10 @@ in
fi
'';

systemd.services.systemd-udevd =
{ restartTriggers = [ config.environment.etc."udev/rules.d".source ];
};

systemd.services.systemd-udevd = {
restartTriggers = [ config.environment.etc."udev/rules.d".source ];
notSocketActivated = true;
};
};

imports = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,17 @@ in
'';
};

tokenPath = mkOption {
environmentFile = mkOption {
type = path;
description = ''
A run-time path to the token file, which is supposed to be provisioned
outside of Nix store.
An environment file containg at least the FASTLY_API_TOKEN= environment
variable.
'';
};
};
serviceOpts = {
serviceConfig = {
LoadCredential = "fastly-api-token:${cfg.tokenPath}";
Environment = [ "FASTLY_API_TOKEN=%d/fastly-api-token" ];
EnvironmentFile = cfg.environmentFile;
ExecStart = escapeSystemdExecArgs (
[
(getExe pkgs.prometheus-fastly-exporter)
Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@ in
};
};
extraConfig = ''
# Frigate wants to connect on 127.0.0.1:5000 for unauthenticated requests
# https://github.com/NixOS/nixpkgs/issues/370349
listen 127.0.0.1:5000;
# vod settings
vod_base_url "";
vod_segments_base_url "";
Expand Down
7 changes: 7 additions & 0 deletions nixos/modules/system/activation/switch-to-configuration.pl
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,13 @@ sub handle_modified_unit { ## no critic(Subroutines::ProhibitManyArgs, Subroutin
}
}

if (parse_systemd_bool(\%new_unit_info, "Service", "X-NotSocketActivated", 0)) {
# If the unit explicitly opts out of socket
# activation, restart it as if it weren't (but do
# restart its sockets, that's fine):
$socket_activated = 0;
}

# If the unit is not socket-activated, record
# that this unit needs to be started below.
# We write this to a file to ensure that the
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/system/boot/networkd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2901,6 +2901,7 @@ let
config.environment.etc."systemd/networkd.conf".source
];
aliases = [ "dbus-org.freedesktop.network1.service" ];
notSocketActivated = true;
};

networking.iproute2 = mkIf (cfg.config.addRouteTablesToIPRoute2 && cfg.config.routeTables != { }) {
Expand Down
13 changes: 9 additions & 4 deletions nixos/modules/virtualisation/oci-containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
defaultBackend = options.virtualisation.oci-containers.backend.default;

containerOptions =
{ ... }:
{ name, ... }:
{

options = {
Expand Down Expand Up @@ -59,6 +59,13 @@ let
example = literalExpression "pkgs.dockerTools.streamLayeredImage {...};";
};

serviceName = mkOption {
type = types.str;
default = "${cfg.backend}-${name}";
defaultText = "<backend>-<name>";
description = "Systemd service name that manages the container";
};

login = {

username = mkOption {
Expand Down Expand Up @@ -525,9 +532,7 @@ in
config = lib.mkIf (cfg.containers != { }) (
lib.mkMerge [
{
systemd.services = mapAttrs' (
n: v: nameValuePair "${cfg.backend}-${n}" (mkService n v)
) cfg.containers;
systemd.services = mapAttrs' (n: v: nameValuePair v.serviceName (mkService n v)) cfg.containers;

assertions =
let
Expand Down
5 changes: 4 additions & 1 deletion nixos/tests/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ import ./make-test-python.nix (
# login and store session
machine.log(machine.succeed(f"http --check-status --session=frigate post http://localhost/api/login user=admin password={password}"))
# make authenticated api requested
# make authenticated api request
machine.log(machine.succeed("http --check-status --session=frigate get http://localhost/api/version"))
# make unauthenticated api request
machine.log(machine.succeed("http --check-status get http://localhost:5000/api/version"))
# wait for a recording to appear
machine.wait_for_file("/var/cache/frigate/test@*.mp4")
'';
Expand Down
1 change: 0 additions & 1 deletion nixos/tests/gitea.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let
meta.maintainers = with maintainers; [
aanderse
kolaente
ma27
];

nodes = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/prometheus-exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ let
fastly = {
exporterConfig = {
enable = true;
tokenPath = pkgs.writeText "token" "abc123";
environmentFile = pkgs.writeText "fastly-exporter-env" "FASTLY_API_TOKEN=abc123";
};

exporterTest = ''
Expand Down
8 changes: 6 additions & 2 deletions pkgs/applications/audio/ardour/7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
liblo,
libogg,
libpulseaudio,
librdf_raptor,
librdf_rasqal,
libsamplerate,
libsigcxx,
Expand Down Expand Up @@ -94,6 +93,12 @@ stdenv.mkDerivation rec {
url = "https://github.com/Ardour/ardour/commit/338cd09a4aa1b36b8095dfc14ab534395f9a4a92.patch?full_index=1";
hash = "sha256-AvV4aLdkfrxPkE4NX2ETSagq4GjEC+sHCEqdcYvL+CY=";
})

# Fix build with boost >= 1.85
(fetchpatch {
url = "https://github.com/Ardour/ardour/commit/f94bde59d740d65e67c5cd13af4d7ea51453aeaa.patch";
hash = "sha256-dGRjkdF3REkANytDR17wIh8J2+AcLFmV4tKZied/OZg=";
})
];

# Ardour's wscript requires git revision and date to be available.
Expand Down Expand Up @@ -139,7 +144,6 @@ stdenv.mkDerivation rec {
liblo
libogg
libpulseaudio
librdf_raptor
librdf_rasqal
libsamplerate
libsigcxx
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/display-managers/greetd/regreet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@

rustPlatform.buildRustPackage rec {
pname = "regreet";
version = "0.1.2";
version = "0.1.3";

src = fetchFromGitHub {
owner = "rharish101";
repo = "ReGreet";
rev = version;
hash = "sha256-ubKSqt3axp46ECIKwq9K1aHTPeuMQ3fCx6aRlhXh2F0=";
hash = "sha256-PYBRfBdy6+cv3VKBFu5RUec/yfuKrAEkRxpanihIt1E=";
};

cargoHash = "sha256-Gwz1xs6OhrBb4xOuUUmxDVKxTC2lyp4Ckzi+9bnaRgo=";
cargoHash = "sha256-SUIyekcuDbPIh/9+EKaAoep9hZDJv8BW+ovtWyDqiCI=";

buildFeatures = [ "gtk4_8" ];

Expand Down
12 changes: 12 additions & 0 deletions pkgs/applications/editors/vim/plugins/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,18 @@ final: prev:
meta.homepage = "https://github.com/Saghen/blink.compat/";
};

blink-ripgrep-nvim = buildVimPlugin {
pname = "blink-ripgrep.nvim";
version = "2025-01-04";
src = fetchFromGitHub {
owner = "mikavilpas";
repo = "blink-ripgrep.nvim";
rev = "1e0ff13ef364b585c1a21148d91b185cf3b246af";
sha256 = "0hhv74pa61b3z990w7j5q59r9wd6l2c7vlxgak6xvgb5gksk3cbp";
};
meta.homepage = "https://github.com/mikavilpas/blink-ripgrep.nvim/";
};

block-nvim = buildVimPlugin {
pname = "block.nvim";
version = "2023-10-10";
Expand Down
1 change: 1 addition & 0 deletions pkgs/applications/editors/vim/plugins/vim-plugin-names
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ https://github.com/max397574/better-escape.nvim/,,
https://github.com/LunarVim/bigfile.nvim/,,
https://github.com/APZelos/blamer.nvim/,HEAD,
https://github.com/giuxtaposition/blink-cmp-copilot/,HEAD,
https://github.com/mikavilpas/blink-ripgrep.nvim/,HEAD,
https://github.com/Saghen/blink.compat/,HEAD,
https://github.com/HampusHauffman/block.nvim/,HEAD,
https://github.com/blueballs-theme/blueballs-neovim/,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "mednafen-pce-fast";
version = "0-unstable-2024-11-15";
version = "0-unstable-2024-12-27";

src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-pce-fast-libretro";
rev = "931586f0512663f625a6e981d3047a6620281ab5";
hash = "sha256-9Nne4upiQNSAlTZsyXcLNIwN8MMKUO1ycahowYW1sWg=";
rev = "cfbb0946f79de33bc615d0a079e1a92f1454c3e3";
hash = "sha256-47Fap6QjwFwodLaHBa78kKUap2DB8FdaEe6AEv0qyCA=";
};

makefile = "Makefile";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/bsnes-hd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
}:
mkLibretroCore {
core = "bsnes-hd-beta";
version = "0-unstable-2023-04-26";
version = "0-unstable-2024-10-21";

src = fetchFromGitHub {
owner = "DerKoun";
repo = "bsnes-hd";
rev = "f46b6d6368ea93943a30b5d4e79e8ed51c2da5e8";
hash = "sha256-Y3FhGtcz7BzwUSBy1SGMuylJdZti/JB8qQnabIkG/dI=";
rev = "0bb7b8645e22ea2476cabd58f32e987b14686601";
hash = "sha256-YzWSZMn6v5hWIHnp6KmmpevCsf35Vi2BCcmFMnrFPH0=";
};

extraBuildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/bsnes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "bsnes";
version = "0-unstable-2024-09-06";
version = "0-unstable-2024-12-13";

src = fetchFromGitHub {
owner = "libretro";
repo = "bsnes-libretro";
rev = "20c55eb6333a11395ba637df8583066483e58cb2";
hash = "sha256-IP00xtxS3wwnQSmYltrX8GEHZX/65xnx2EsmQlE1VZM=";
rev = "a0bb11bbb1fc5d6b478baca53c3efe526c43986c";
hash = "sha256-unOJ2hdCA5LxNUcJe7fJCAetLpqrQzujxFDOsxLzXow=";
};

makefile = "Makefile";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/gpsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "gpsp";
version = "0-unstable-2024-09-18";
version = "0-unstable-2024-12-26";

src = fetchFromGitHub {
owner = "libretro";
repo = "gpsp";
rev = "36061caf8cc5e15c3c92fb772b6b8560c7c59ec7";
hash = "sha256-o36OUdgm7p+rAMN6R2e2Lqi4oBLTyxziw7Lr20ERBg0=";
rev = "66ced08c693094f2eaefed5e11bd596c41028959";
hash = "sha256-gXk9T62wns7QixY98RSjfM/OW6SfH8N3NcjZ328WSAM=";
};

makefile = "Makefile";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/mame2003-plus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "mame2003-plus";
version = "0-unstable-2024-11-01";
version = "0-unstable-2024-12-29";

src = fetchFromGitHub {
owner = "libretro";
repo = "mame2003-plus-libretro";
rev = "b00ea1c9574126d75ae7b80c3b41e1186421fc1d";
hash = "sha256-Zq4P5UsZh3p9/zasfTC+pzWiLAo7T2qAgZw4bJ4ADdM=";
rev = "aaf1a95728d9ca6d4cf6633b6a839f8daa27db81";
hash = "sha256-AjeXfISAcH6RiHU5gJutZUdpg2p+ASVKsI1+Nl76xSY=";
};

makefile = "Makefile";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/nestopia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "nestopia";
version = "0-unstable-2024-12-14";
version = "0-unstable-2024-12-22";

src = fetchFromGitHub {
owner = "libretro";
repo = "nestopia";
rev = "e7b65504ffc7f14fc5c74954d02b18f44c3aaf43";
hash = "sha256-WI/EPWfTmcPM8SSVroqlya6U5cEgmesSJGbPOjxCSUg=";
rev = "6bbfff9a56ead67f0da696ab2c3aea3c11896964";
hash = "sha256-D2FtfabikcZq0dl+ot/NJJkOaQXj0Sl5P2ioNrvxgSs=";
};

makefile = "Makefile";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/emulators/libretro/cores/prboom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "prboom";
version = "0-unstable-2024-10-21";
version = "0-unstable-2024-12-27";

src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-prboom";
rev = "d25ccfb9739069824d8fff99e3ae78a58a09df01";
hash = "sha256-IaMreS2MSkFdZ3Jff2FOZBvKIIa4KIkp41LIg3PLl44=";
rev = "b3e5f8b2e8855f9c6fc7ff7a0036e4e61379177d";
hash = "sha256-FtPn54s/QUu8fjeUBaAQMZ6EWAixV+gawuCv2eM+qrs=";
};

makefile = "Makefile";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "2048";
version = "0-unstable-2024-06-28";
version = "0-unstable-2024-12-27";

src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-2048";
rev = "5474ed1ab880b3296c9860d0943d7de1970c79dd";
hash = "sha256-i6bbxsLpSicDDGYKAxTMCMioHHfvBzVokun3PNYgDsc=";
rev = "86e02d3c2dd76858db7370f5df1ccfc33b3abee1";
hash = "sha256-k3te3XZCw86NkqXpjZaYWi4twUvh9UBkiPyqposLTEs=";
};

meta = {
Expand Down
Loading

0 comments on commit de20e4b

Please sign in to comment.