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] committed Jun 10, 2024
2 parents 4b24ae6 + 98cc4fc commit 0cc7846
Show file tree
Hide file tree
Showing 129 changed files with 1,525 additions and 842 deletions.
11 changes: 11 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16957,6 +16957,12 @@
githubId = 22085373;
name = "Luis Hebendanz";
};
qubitnano = {
name = "qubitnano";
email = "[email protected]";
github = "qubitnano";
githubId = 146656568;
};
queezle = {
email = "[email protected]";
github = "queezle42";
Expand Down Expand Up @@ -22781,6 +22787,11 @@
githubId = 40352765;
name = "Yoctocell";
};
yomaq = {
name = "yomaq";
github = "yomaq";
githubId = 112864332;
};
yorickvp = {
email = "[email protected]";
matrix = "@yorickvp:matrix.org";
Expand Down
25 changes: 20 additions & 5 deletions nixos/modules/hardware/video/nvidia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ in
option is supported is used
'';

prime.reverseSync.setupCommands.enable =
(lib.mkEnableOption ''
configure the display manager to be able to use the outputs
attached to the NVIDIA GPU.
Disable in order to configure the NVIDIA GPU outputs manually using xrandr.
Note that this configuration will only be successful when a display manager
for which the {option}`services.xserver.displayManager.setupCommands`
option is supported is used
'')
// {
default = true;
};

nvidiaSettings =
(lib.mkEnableOption ''
nvidia-settings, NVIDIA's GUI configuration tool
Expand Down Expand Up @@ -437,11 +450,13 @@ in
providerCmdParams =
if syncCfg.enable then "\"${gpuProviderName}\" NVIDIA-0" else "NVIDIA-G0 \"${gpuProviderName}\"";
in
lib.optionalString (syncCfg.enable || reverseSyncCfg.enable) ''
# Added by nvidia configuration module for Optimus/PRIME.
${lib.getExe pkgs.xorg.xrandr} --setprovideroutputsource ${providerCmdParams}
${lib.getExe pkgs.xorg.xrandr} --auto
'';
lib.optionalString
(syncCfg.enable || (reverseSyncCfg.enable && reverseSyncCfg.setupCommands.enable))
''
# Added by nvidia configuration module for Optimus/PRIME.
${lib.getExe pkgs.xorg.xrandr} --setprovideroutputsource ${providerCmdParams}
${lib.getExe pkgs.xorg.xrandr} --auto
'';

environment.etc = {
"nvidia/nvidia-application-profiles-rc" = lib.mkIf nvidia_x11.useProfiles {
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@
./services/misc/zoneminder.nix
./services/misc/zookeeper.nix
./services/monitoring/alerta.nix
./services/monitoring/alloy.nix
./services/monitoring/apcupsd.nix
./services/monitoring/arbtt.nix
./services/monitoring/below.nix
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/services/desktops/espanso.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ in {
};

config = mkIf cfg.enable {
services.espanso.package = mkIf cfg.wayland pkgs.espanso-wayland;
systemd.user.services.espanso = {
description = "Espanso daemon";
serviceConfig = {
Expand Down
4 changes: 3 additions & 1 deletion nixos/modules/services/logging/journalwatch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ in {
'';
};

package = mkPackageOption pkgs "journalwatch" { };

priority = mkOption {
type = types.int;
default = 6;
Expand Down Expand Up @@ -240,7 +242,7 @@ in {
# requires a relative directory name to create beneath /var/lib
StateDirectory = user;
StateDirectoryMode = "0750";
ExecStart = "${pkgs.python3Packages.journalwatch}/bin/journalwatch mail";
ExecStart = "${getExe cfg.package} mail";
# lowest CPU and IO priority, but both still in best-effort class to prevent starvation
Nice=19;
IOSchedulingPriority=7;
Expand Down
80 changes: 80 additions & 0 deletions nixos/modules/services/monitoring/alloy.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.services.alloy;
in
{
meta = {
maintainers = with maintainers; [ flokli hbjydev ];
};

options.services.alloy = {
enable = mkEnableOption "Grafana Alloy";

package = mkPackageOption pkgs "grafana-alloy" { };

configPath = mkOption {
type = lib.types.path;
default = "/etc/alloy";
description = ''
Alloy configuration file/directory path.
We default to `/etc/alloy` here, and expect the user to configure a
configuration file via `environment.etc."alloy/config.alloy"`.
This allows config reload, contrary to specifying a store path.
A `reloadTrigger` for `config.alloy` is configured.
Other `*.alloy` files in the same directory (ignoring subdirs) are also
honored, but it's necessary to manually extend
`systemd.services.alloy.reloadTriggers` to enable config reload
during nixos-rebuild switch.
This can also point to another directory containing `*.alloy` files, or
a single Alloy file in the Nix store (at the cost of reload).
Component names must be unique across all Alloy configuration files, and
configuration blocks must not be repeated.
Alloy will continue to run if subsequent reloads of the configuration
file fail, potentially marking components as unhealthy depending on
the nature of the failure. When this happens, Alloy will continue
functioning in the last valid state.
'';
};

extraFlags = mkOption {
type = with lib.types; listOf str;
default = [ ];
example = [ "--server.http.listen-addr=127.0.0.1:12346" "--disable-reporting" ];
description = ''
Extra command-line flags passed to {command}`alloy run`.
See <https://grafana.com/docs/alloy/latest/reference/cli/run/>
'';
};
};


config = mkIf cfg.enable {
systemd.services.alloy = {
wantedBy = [ "multi-user.target" ];
reloadTriggers = [ config.environment.etc."alloy/config.alloy".source or null ];
serviceConfig = {
Restart = "always";
DynamicUser = true;
RestartSec = 2;
SupplementaryGroups = [
# allow to read the systemd journal for loki log forwarding
"systemd-journal"
];
ExecStart = "${lib.getExe cfg.package} run ${cfg.configPath} ${escapeShellArgs cfg.extraFlags}";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
ConfigurationDirectory = "alloy";
StateDirectory = "alloy";
WorkingDirectory = "%S/alloy";
Type = "simple";
};
};
};
}
23 changes: 22 additions & 1 deletion nixos/modules/services/networking/tailscale.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,21 @@ in {
};

extraUpFlags = mkOption {
description = "Extra flags to pass to {command}`tailscale up`.";
description = ''
Extra flags to pass to {command}`tailscale up`. Only applied if `authKeyFile` is specified.";
'';
type = types.listOf types.str;
default = [];
example = ["--ssh"];
};

extraSetFlags = mkOption {
description = "Extra flags to pass to {command}`tailscale set`.";
type = types.listOf types.str;
default = [];
example = ["--advertise-exit-node"];
};

extraDaemonFlags = mkOption {
description = "Extra flags to pass to {command}`tailscaled`.";
type = types.listOf types.str;
Expand Down Expand Up @@ -120,6 +129,18 @@ in {
'';
};

systemd.services.tailscaled-set = mkIf (cfg.extraSetFlags != []) {
after = ["tailscaled.service"];
wants = ["tailscaled.service"];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
};
script = ''
${cfg.package}/bin/tailscale set ${escapeShellArgs cfg.extraSetFlags}
'';
};

boot.kernel.sysctl = mkIf (cfg.useRoutingFeatures == "server" || cfg.useRoutingFeatures == "both") {
"net.ipv4.conf.all.forwarding" = mkOverride 97 true;
"net.ipv6.conf.all.forwarding" = mkOverride 97 true;
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ in {
akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {};
akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; };
alice-lg = handleTest ./alice-lg.nix {};
alloy = handleTest ./alloy.nix {};
allTerminfo = handleTest ./all-terminfo.nix {};
alps = handleTest ./alps.nix {};
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
Expand Down
32 changes: 32 additions & 0 deletions nixos/tests/alloy.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import ./make-test-python.nix ({ lib, pkgs, ... }:

let
nodes = {
machine = {
services.alloy = {
enable = true;
};
environment.etc."alloy/config.alloy".text = "";
};
};
in
{
name = "alloy";

meta = with lib.maintainers; {
maintainers = [ flokli hbjydev ];
};

inherit nodes;

testScript = ''
start_all()
machine.wait_for_unit("alloy.service")
machine.wait_for_open_port(12345)
machine.succeed(
"curl -sSfN http:https://127.0.0.1:12345/-/healthy"
)
machine.shutdown()
'';
})
4 changes: 2 additions & 2 deletions pkgs/applications/audio/g4music/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "g4music";
version = "3.6";
version = "3.6.2";

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "neithern";
repo = "g4music";
rev = "v${finalAttrs.version}";
hash = "sha256-RDz3QwjbzYS4JllxpSA59cs2S3dNTmNcOoxu4JFC8oM=";
hash = "sha256-yNKDTcLunTLhAtOBrjuycw0rrdCSwmhhVyBg3AfMUCQ=";
};

nativeBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}:

let
rev = "f48de0896d3af80f5e15aef512b7485eb46df9f6";
rev = "e5cf0b704274d3deae8f4a3b6a3d0664a176bc8b";
python = python3.withPackages (ps: with ps; [
epc
orjson
Expand All @@ -28,13 +28,13 @@ let
in
melpaBuild {
pname = "lsp-bridge";
version = "20240601.1149";
version = "20240609.1553";

src = fetchFromGitHub {
owner = "manateelazycat";
repo = "lsp-bridge";
inherit rev;
hash = "sha256-ocKNRSt5RVKGnxd0odI43jdr27oYrRLdnABh6x63CfM=";
hash = "sha256-96GgMJPLFoabhlvjTMWKtEpGuctjlcRuChvzDziaq8g=";
};

commit = rev;
Expand Down
Loading

0 comments on commit 0cc7846

Please sign in to comment.