Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 5, 2023
2 parents 989723e + 9497a77 commit 66e2125
Show file tree
Hide file tree
Showing 110 changed files with 10,973 additions and 978 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
nixos/tests/zfs.nix @raitobezarius

# Zig
/pkgs/development/compilers/zig @AndersonTorres @figsoda
/doc/hooks/zig.section.md @AndersonTorres @figsoda
/pkgs/development/compilers/zig @figsoda
/doc/hooks/zig.section.md @figsoda

# Linux Kernel
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs
80 changes: 40 additions & 40 deletions nixos/doc/manual/release-notes/rl-2311.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
- [Breaking Changes](#sec-release-23.11-nixos-breaking-changes)
- [New Services](#sec-release-23.11-nixos-new-services)
- [Other Notable Changes](#sec-release-23.11-nixos-notable-changes)
- [Nixpkgs Library Changes](#sec-release-23.11-nixpkgs-lib)
- [Nixpkgs Library](#sec-release-23.11-nixpkgs-lib)
- [Breaking Changes](#sec-release-23.11-lib-breaking)
- [Additions and Improvements](#sec-release-23.11-lib-additions-improvements)
- [Deprecations](#sec-release-23.11-lib-deprecations)
Expand Down Expand Up @@ -1317,22 +1317,22 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
### Breaking Changes {#sec-release-23.11-lib-breaking}
- [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl-prime)
- [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl-prime)
now always evaluates the initial accumulator argument first. If you depend on
the lazier behavior, consider using
[`lib.lists.foldl`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl)
[`lib.lists.foldl`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl)
or
[`builtins.foldl'`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-foldl')
instead.
- [`lib.attrsets.foldlAttrs`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.foldlAttrs)
- [`lib.attrsets.foldlAttrs`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.attrsets.foldlAttrs)
now always evaluates the initial accumulator argument first.
- Now that the internal NixOS transition to Markdown documentation is complete,
`lib.options.literalDocBook` has been removed after deprecation in 22.11.
- `lib.types.string` is now fully deprecated and gives a warning when used.
### Additions and Improvements {#sec-release-23.11-lib-additions-improvements}
- [`lib.fileset`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-fileset):
- [`lib.fileset`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-fileset):
A new sub-library to select local files to use for sources, designed to be
easy and safe to use.
Expand All @@ -1341,7 +1341,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
post](https://www.tweag.io/blog/2023-11-28-file-sets/) or [the
tutorial](https://nix.dev/tutorials/file-sets).
- [`lib.gvariant`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-gvariant):
- [`lib.gvariant`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-gvariant):
A partial and basic implementation of GVariant formatted strings. See
[GVariant Format
Strings](https://docs.gtk.org/glib/gvariant-format-strings.html) for details.
Expand All @@ -1351,58 +1351,58 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
change in backwards incompatible ways without prior notice.
:::
- [`lib.asserts`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-asserts):
- [`lib.asserts`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-asserts):
New function:
[`assertEachOneOf`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.asserts.assertEachOneOf).
- [`lib.attrsets`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-attrsets):
[`assertEachOneOf`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.asserts.assertEachOneOf).
- [`lib.attrsets`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-attrsets):
New function:
[`attrsToList`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.attrsToList).
- [`lib.customisation`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-customisation):
[`attrsToList`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.attrsets.attrsToList).
- [`lib.customisation`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-customisation):
New function:
[`makeScopeWithSplicing'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.customisation.makeScopeWithSplicing-prime).
- [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-fixedPoints):
[`makeScopeWithSplicing'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.customisation.makeScopeWithSplicing-prime).
- [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-fixedPoints):
Documentation improvements for
[`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.fixedPoints.fix).
[`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.fixedPoints.fix).
- `lib.generators`: New functions:
[`mkDconfKeyValue`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.generators.mkDconfKeyValue),
[`toDconfINI`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.generators.toDconfINI).
[`mkDconfKeyValue`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.mkDconfKeyValue),
[`toDconfINI`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.toDconfINI).
`lib.generators.toKeyValue` now supports the `indent` attribute in its first
argument.
- [`lib.lists`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-lists):
- [`lib.lists`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-lists):
New functions:
[`findFirstIndex`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.findFirstIndex),
[`hasPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.hasPrefix),
[`removePrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.removePrefix),
[`commonPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.commonPrefix),
[`allUnique`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.allUnique).
[`findFirstIndex`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.findFirstIndex),
[`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.hasPrefix),
[`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.removePrefix),
[`commonPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.commonPrefix),
[`allUnique`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.allUnique).
Documentation improvements for
[`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl-prime).
- [`lib.meta`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-meta):
[`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl-prime).
- [`lib.meta`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-meta):
Documentation of functions now gets rendered
- [`lib.path`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-path):
- [`lib.path`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-path):
New functions:
[`hasPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.hasPrefix),
[`removePrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.removePrefix),
[`splitRoot`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.splitRoot),
[`subpath.components`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.subpath.components).
- [`lib.strings`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-strings):
[`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.hasPrefix),
[`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.removePrefix),
[`splitRoot`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.splitRoot),
[`subpath.components`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.subpath.components).
- [`lib.strings`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-strings):
New functions:
[`replicate`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.replicate),
[`cmakeOptionType`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeOptionType),
[`cmakeBool`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeBool),
[`cmakeFeature`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeFeature).
- [`lib.trivial`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-trivial):
[`replicate`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.replicate),
[`cmakeOptionType`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeOptionType),
[`cmakeBool`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeBool),
[`cmakeFeature`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeFeature).
- [`lib.trivial`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-trivial):
New function:
[`mirrorFunctionArgs`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.trivial.mirrorFunctionArgs).
[`mirrorFunctionArgs`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.trivial.mirrorFunctionArgs).
- `lib.systems`: New function:
[`equals`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.systems.equals).
- [`lib.options`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-options):
[`equals`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.systems.equals).
- [`lib.options`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-options):
Improved documentation for
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption).
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption).
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
now also supports the `pkgsText` attribute.
Module system:
Expand Down
8 changes: 6 additions & 2 deletions nixos/modules/config/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ let
if pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform then ''
echo "Ignoring validation for cross-compilation"
''
else ''
else
let
showCommand = if isNixAtLeast "2.20pre" then "config show" else "show-config";
in
''
echo "Validating generated nix.conf"
ln -s $out ./nix.conf
set -e
set +o pipefail
NIX_CONF_DIR=$PWD \
${cfg.package}/bin/nix show-config ${optionalString (isNixAtLeast "2.3pre") "--no-net"} \
${cfg.package}/bin/nix ${showCommand} ${optionalString (isNixAtLeast "2.3pre") "--no-net"} \
${optionalString (isNixAtLeast "2.4pre") "--option experimental-features nix-command"} \
|& sed -e 's/^warning:/error:/' \
| (! grep '${if cfg.checkAllErrors then "^error:" else "^error: unknown setting"}')
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/misc/ids.nix
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ in
telegraf = 256;
gitlab-runner = 257;
postgrey = 258;
hound = 259;
# hound = 259; # unused, removed 2023-11-21
leaps = 260;
ipfs = 261;
# stanchion = 262; # unused, removed 2020-10-14
Expand Down Expand Up @@ -599,7 +599,7 @@ in
#telegraf = 256; # unused
gitlab-runner = 257;
postgrey = 258;
hound = 259;
# hound = 259; # unused, removed 2023-11-21
leaps = 260;
ipfs = 261;
# stanchion = 262; # unused, removed 2020-10-14
Expand Down
19 changes: 13 additions & 6 deletions nixos/modules/services/monitoring/prometheus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ let
# This becomes the main config file for Prometheus
promConfig = {
global = filterValidPrometheus cfg.globalConfig;
rule_files = map (promtoolCheck "check rules" "rules") (cfg.ruleFiles ++ [
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
]);
scrape_configs = filterValidPrometheus cfg.scrapeConfigs;
remote_write = filterValidPrometheus cfg.remoteWrite;
remote_read = filterValidPrometheus cfg.remoteRead;
rule_files = optionals (!(cfg.enableAgentMode)) (map (promtoolCheck "check rules" "rules") (cfg.ruleFiles ++ [
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
]));
alerting = {
inherit (cfg) alertmanagers;
};
Expand All @@ -62,15 +62,20 @@ let
promtoolCheck "check config ${lib.optionalString (cfg.checkConfig == "syntax-only") "--syntax-only"}" "prometheus.yml" yml;

cmdlineArgs = cfg.extraFlags ++ [
"--storage.tsdb.path=${workingDir}/data/"
"--config.file=${
if cfg.enableReload
then "/etc/prometheus/prometheus.yaml"
else prometheusYml
}"
"--web.listen-address=${cfg.listenAddress}:${builtins.toString cfg.port}"
"--alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
] ++ optional (cfg.webExternalUrl != null) "--web.external-url=${cfg.webExternalUrl}"
] ++ (
if (cfg.enableAgentMode) then [
"--enable-feature=agent"
] else [
"--alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity }"
"--storage.tsdb.path=${workingDir}/data/"
])
++ optional (cfg.webExternalUrl != null) "--web.external-url=${cfg.webExternalUrl}"
++ optional (cfg.retentionTime != null) "--storage.tsdb.retention.time=${cfg.retentionTime}"
++ optional (cfg.webConfigFile != null) "--web.config.file=${cfg.webConfigFile}";

Expand Down Expand Up @@ -1612,6 +1617,8 @@ in
'';
};

enableAgentMode = mkEnableOption (lib.mdDoc "agent mode");

configText = mkOption {
type = types.nullOr types.lines;
default = null;
Expand Down
77 changes: 36 additions & 41 deletions nixos/modules/services/search/hound.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ with lib;
let
cfg = config.services.hound;
in {
imports = [
(lib.mkRemovedOptionModule [ "services" "hound" "extraGroups" ] "Use users.users.hound.extraGroups instead")
];

meta.maintainers = with maintainers; [ SuperSandro2000 ];

options = {
services.hound = {
enable = mkOption {
Expand All @@ -13,6 +19,8 @@ in {
'';
};

package = mkPackageOptionMD pkgs "hound" { };

user = mkOption {
default = "hound";
type = types.str;
Expand All @@ -29,91 +37,78 @@ in {
'';
};

extraGroups = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "dialout" ];
description = lib.mdDoc ''
List of extra groups that the "hound" user should be a part of.
'';
};

home = mkOption {
default = "/var/lib/hound";
type = types.path;
description = lib.mdDoc ''
The path to use as hound's $HOME. If the default user
"hound" is configured then this is the home of the "hound"
user.
The path to use as hound's $HOME.
If the default user "hound" is configured then this is the home of the "hound" user.
'';
};

package = mkPackageOption pkgs "hound" { };

config = mkOption {
type = types.str;
description = lib.mdDoc ''
The full configuration of the Hound daemon. Note the dbpath
should be an absolute path to a writable location on disk.
'';
example = literalExpression ''
'''
{
"max-concurrent-indexers" : 2,
"dbpath" : "''${services.hound.home}/data",
"repos" : {
"nixpkgs": {
"url" : "https://www.github.com/NixOS/nixpkgs.git"
}
}
{
"max-concurrent-indexers" : 2,
"repos" : {
"nixpkgs": {
"url" : "https://www.github.com/NixOS/nixpkgs.git"
}
}
'''
}
'';
};

listen = mkOption {
type = types.str;
default = "0.0.0.0:6080";
example = "127.0.0.1:6080 or just :6080";
example = ":6080";
description = lib.mdDoc ''
Listen on this IP:port / :port
Listen on this [IP]:port
'';
};
};
};

config = mkIf cfg.enable {
users.groups = optionalAttrs (cfg.group == "hound") {
hound.gid = config.ids.gids.hound;
users.groups = lib.mkIf (cfg.group == "hound") {
hound = { };
};

users.users = optionalAttrs (cfg.user == "hound") {
users.users = lib.mkIf (cfg.user == "hound") {
hound = {
description = "hound code search";
description = "Hound code search";
createHome = true;
home = cfg.home;
group = cfg.group;
extraGroups = cfg.extraGroups;
uid = config.ids.uids.hound;
isSystemUser = true;
inherit (cfg) home group;
};
};

systemd.services.hound = {
systemd.services.hound = let
configFile = pkgs.writeTextFile {
name = "hound.json";
text = cfg.config;
checkPhase = ''
# check if the supplied text is valid json
${lib.getExe pkgs.jq} . $target > /dev/null
'';
};
in {
description = "Hound Code Search";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];

serviceConfig = {
User = cfg.user;
Group = cfg.group;
WorkingDirectory = cfg.home;
ExecStartPre = "${pkgs.git}/bin/git config --global --replace-all http.sslCAinfo /etc/ssl/certs/ca-certificates.crt";
ExecStart = "${cfg.package}/bin/houndd" +
" -addr ${cfg.listen}" +
" -conf ${pkgs.writeText "hound.json" cfg.config}";

ExecStart = "${cfg.package}/bin/houndd -addr ${cfg.listen} -conf ${configFile}";
};
};
};

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

stdenv.mkDerivation rec {
pname = "lightdm-slick-greeter";
version = "2.0.0";
version = "2.0.1";

src = fetchFromGitHub {
owner = "linuxmint";
repo = "slick-greeter";
rev = version;
sha256 = "sha256-2iwH8npCfo4z1K4WQNP2Pd32PJTkCX/rT0+1RTrBO8E=";
sha256 = "sha256-Tyyhsel4yWfp8Npn9vERtd+9jzxdvjsj91ebEnvA/D0=";
};

nativeBuildInputs = [
Expand Down
Loading

0 comments on commit 66e2125

Please sign in to comment.