Skip to content

Commit

Permalink
Merge master into haskell-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sternenseemann committed May 31, 2024
2 parents d902325 + 2dc0bf5 commit c2b4890
Show file tree
Hide file tree
Showing 328 changed files with 5,719 additions and 2,976 deletions.
2 changes: 1 addition & 1 deletion doc/build-helpers/testers.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ runCommand "example" {

:::

## `testEqualContents` {#tester-equalContents}
## `testEqualContents` {#tester-testEqualContents}

Check that two paths have the same contents.

Expand Down
6 changes: 2 additions & 4 deletions doc/languages-frameworks/nim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The following example shows a Nim program that depends only on Nim libraries:
```nix
{ lib, buildNimPackage, fetchFromGitHub }:
buildNimPackage { } (finalAttrs: {
buildNimPackage (finalAttrs: {
pname = "ttop";
version = "1.2.7";
Expand Down Expand Up @@ -80,7 +80,6 @@ For example, to propagate a dependency on SDL2 for lockfiles that select the Nim
/* … */
sdl2 =
lockAttrs:
finalAttrs:
{ buildInputs ? [ ], ... }:
{
buildInputs = buildInputs ++ [ SDL2 ];
Expand All @@ -89,9 +88,8 @@ For example, to propagate a dependency on SDL2 for lockfiles that select the Nim
}
```

The annotations in the `nim-overrides.nix` set are functions that take three arguments and return a new attrset to be overlayed on the package being built.
The annotations in the `nim-overrides.nix` set are functions that take two arguments and return a new attrset to be overlayed on the package being built.
- lockAttrs: the attrset for this library from within a lockfile. This can be used to implement library version constraints, such as marking libraries as broken or insecure.
- finalAttrs: the final attrset passed by `buildNimPackage` to `stdenv.mkDerivation`.
- prevAttrs: the attrset produced by initial arguments to `buildNimPackage` and any preceding lockfile overlays.

### Overriding an Nim library override {#nim-lock-overrides-overrides}
Expand Down
15 changes: 15 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,15 @@
fingerprint = "51E4 F5AB 1B82 BE45 B422 9CC2 43A5 E25A A5A2 7849";
}];
};
aduh95 = {
email = "[email protected]";
github = "aduh95";
githubId = 14309773;
name = "Antoine du Hamel";
keys = [{
fingerprint = "C0D6 2484 39F1 D560 4AAF FB40 21D9 00FF DB23 3756";
}];
};
aerialx = {
email = "[email protected]";
github = "AerialX";
Expand Down Expand Up @@ -1086,6 +1095,12 @@
fingerprint = "1F73 8879 5E5A 3DFC E2B3 FA32 87D1 AADC D25B 8DEE";
}];
};
aman9das = {
email = "[email protected]";
github = "Aman9das";
githubId = 39594914;
name = "Aman Das";
};
amanjeev = {
email = "[email protected]";
github = "amanjeev";
Expand Down
8 changes: 6 additions & 2 deletions maintainers/scripts/nixpkgs-lint.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{ stdenv, lib, makeWrapper, perl, perlPackages }:

stdenv.mkDerivation {
name = "nixpkgs-lint-1";
pname = "nixpkgs-lint";
version = "1";

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl perlPackages.XMLSimple ];

dontUnpack = true;
buildPhase = "true";
dontBuild = true;

installPhase =
''
mkdir -p $out/bin
cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint
# make the built version hermetic
substituteInPlace $out/bin/nixpkgs-lint \
--replace-fail "#! /usr/bin/env nix-shell" "#! ${lib.getExe perl}"
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
'';

Expand Down
8 changes: 6 additions & 2 deletions nixos/doc/manual/release-notes/rl-2405.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ In addition to numerous new and upgraded packages, this release has the followin
}
```

- Cinnamon has been updated to 6.0. Please be aware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release and could potentially [affect Xorg sessions](https://blog.linuxmint.com/?p=4639). We suggest a reboot when switching between sessions.

- GNOME has been updated to 46 "Kathmandu", which introduces an enhanced Files app, support for OneDrive in Online Accounts, and more changes. Refer to the [release notes](https://release.gnome.org/46/) for more details.

- Lomiri (formerly known as Unity8) desktop mode, using Mir 2.x to function as a Wayland compositor, is now available and can be installed with `services.desktopManager.lomiri.enable = true`. Note that some core applications, services and indicators have yet to be packaged, and some functions may remain incomplete, but the base experience should be there.

- LXQt has been updated to 2.0, which is based on Qt 6 and features Wayland support for many applications.

- MATE has been updated to 1.28.
- To properly support panel plugins built with Wayland (in-process) support, we are introducing the `services.xserver.desktopManager.mate.extraPanelApplets` option, please use that for installing panel applets.
- Similarly, please use the `services.xserver.desktopManager.mate.extraCajaExtensions` option for installing Caja extensions.
Expand Down Expand Up @@ -619,8 +625,6 @@ Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` for Pi

- `castopod` has some migration actions to be taken in case of a S3 setup. Some new features may also need some manual migration actions. See [https://code.castopod.org/adaures/castopod/-/releases](https://code.castopod.org/adaures/castopod/-/releases) for more information.

- `cinnamon` has been updated to 6.0. Please be aware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release and could potentially [affect Xorg sessions](https://blog.linuxmint.com/?p=4639). We suggest a reboot when switching between sessions.

- `documentation.man.mandoc` now, by default, uses `MANPATH` to set the directories where mandoc will search for manual pages.
This enables mandoc to find manual pages in Nix profiles. To set the manual search paths via the `mandoc.conf` configuration file like before, use `documentation.man.mandoc.settings.manpath` instead.

Expand Down
7 changes: 7 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
nvimpager settings: user commands in `-c` and `--cmd` now override the
respective default settings because they are executed later.

- The Invoiceplane module now only accepts the structured `settings` option.
`extraConfig` is now removed.

- Legacy package `stalwart-mail_0_6` was dropped, please note the
[manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md)
before changing the package to `pkgs.stalwart-mail` in
Expand All @@ -31,6 +34,10 @@
for information on working around `output '...' is not allowed to refer to
the following paths` errors caused by this change.

- The `stalwart-mail` module now uses RocksDB as the default storage backend
for `stateVersion` ≥ 24.11. (It was previously using SQLite for structured
data and the filesystem for blobs).

## Other Notable Changes {#sec-release-24.11-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
Expand Down
24 changes: 24 additions & 0 deletions nixos/lib/systemd-lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,30 @@ in rec {
in if errors == [] then true
else trace (concatStringsSep "\n" errors) false;

checkUnitConfigWithLegacyKey = legacyKey: group: checks: attrs:
let
dump = lib.generators.toPretty { }
(lib.generators.withRecursion { depthLimit = 2; throwOnDepthLimit = false; } attrs);
attrs' =
if legacyKey == null
then attrs
else if ! attrs?${legacyKey}
then attrs
else if removeAttrs attrs [ legacyKey ] == {}
then attrs.${legacyKey}
else throw ''
The declaration
${dump}
must not mix unit options with the legacy key '${legacyKey}'.
This can be fixed by moving all settings from within ${legacyKey}
one level up.
'';
in
checkUnitConfig group checks attrs';

toOption = x:
if x == true then "true"
else if x == false then "false"
Expand Down
22 changes: 11 additions & 11 deletions nixos/lib/systemd-network-units.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ in {
${attrsToSection def.l2tpConfig}
'' + flip concatMapStrings def.l2tpSessions (x: ''
[L2TPSession]
${attrsToSection x.l2tpSessionConfig}
${attrsToSection x}
'') + optionalString (def.wireguardConfig != { }) ''
[WireGuard]
${attrsToSection def.wireguardConfig}
'' + flip concatMapStrings def.wireguardPeers (x: ''
[WireGuardPeer]
${attrsToSection x.wireguardPeerConfig}
${attrsToSection x}
'') + optionalString (def.bondConfig != { }) ''
[Bond]
${attrsToSection def.bondConfig}
Expand Down Expand Up @@ -122,13 +122,13 @@ in {
${concatStringsSep "\n" (map (s: "Xfrm=${s}") def.xfrm)}
'' + "\n" + flip concatMapStrings def.addresses (x: ''
[Address]
${attrsToSection x.addressConfig}
${attrsToSection x}
'') + flip concatMapStrings def.routingPolicyRules (x: ''
[RoutingPolicyRule]
${attrsToSection x.routingPolicyRuleConfig}
${attrsToSection x}
'') + flip concatMapStrings def.routes (x: ''
[Route]
${attrsToSection x.routeConfig}
${attrsToSection x}
'') + optionalString (def.dhcpV4Config != { }) ''
[DHCPv4]
${attrsToSection def.dhcpV4Config}
Expand All @@ -149,22 +149,22 @@ in {
${attrsToSection def.ipv6SendRAConfig}
'' + flip concatMapStrings def.ipv6Prefixes (x: ''
[IPv6Prefix]
${attrsToSection x.ipv6PrefixConfig}
${attrsToSection x}
'') + flip concatMapStrings def.ipv6RoutePrefixes (x: ''
[IPv6RoutePrefix]
${attrsToSection x.ipv6RoutePrefixConfig}
${attrsToSection x}
'') + flip concatMapStrings def.dhcpServerStaticLeases (x: ''
[DHCPServerStaticLease]
${attrsToSection x.dhcpServerStaticLeaseConfig}
${attrsToSection x}
'') + optionalString (def.bridgeConfig != { }) ''
[Bridge]
${attrsToSection def.bridgeConfig}
'' + flip concatMapStrings def.bridgeFDBs (x: ''
[BridgeFDB]
${attrsToSection x.bridgeFDBConfig}
${attrsToSection x}
'') + flip concatMapStrings def.bridgeMDBs (x: ''
[BridgeMDB]
${attrsToSection x.bridgeMDBConfig}
${attrsToSection x}
'') + optionalString (def.lldpConfig != { }) ''
[LLDP]
${attrsToSection def.lldpConfig}
Expand Down Expand Up @@ -251,7 +251,7 @@ in {
${attrsToSection def.quickFairQueueingConfigClass}
'' + flip concatMapStrings def.bridgeVLANs (x: ''
[BridgeVLAN]
${attrsToSection x.bridgeVLANConfig}
${attrsToSection x}
'') + def.extraConfig;

}
2 changes: 1 addition & 1 deletion nixos/modules/hardware/xone.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
in
{
options.hardware.xone = {
enable = mkEnableOption "the xone driver for Xbox One and Xbobx Series X|S accessories";
enable = mkEnableOption "the xone driver for Xbox One and Xbox Series X|S accessories";
};

config = mkIf cfg.enable {
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 @@ -281,6 +281,7 @@
./programs/systemtap.nix
./programs/thefuck.nix
./programs/thunar.nix
./programs/thunderbird.nix
./programs/tmux.nix
./programs/traceroute.nix
./programs/trippy.nix
Expand Down
89 changes: 89 additions & 0 deletions nixos/modules/programs/thunderbird.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.programs.thunderbird;
policyFormat = pkgs.formats.json { };
policyDoc = "https://github.com/thunderbird/policy-templates";
in
{
options.programs.thunderbird = {
enable = lib.mkEnableOption "Thunderbird mail client";

package = lib.mkPackageOption pkgs "thunderbird" { };

policies = lib.mkOption {
type = policyFormat.type;
default = { };
description = ''
Group policies to install.
See [Thunderbird's documentation](${policyDoc})
for a list of available options.
This can be used to install extensions declaratively! Check out the
documentation of the `ExtensionSettings` policy for details.
'';
};

preferences = lib.mkOption {
type =
with lib.types;
attrsOf (oneOf [
bool
int
str
]);
default = { };
description = ''
Preferences to set from `about:config`.
Some of these might be able to be configured more ergonomically
using policies.
'';
};

preferencesStatus = lib.mkOption {
type = lib.types.enum [
"default"
"locked"
"user"
"clear"
];
default = "locked";
description = ''
The status of `thunderbird.preferences`.
`status` can assume the following values:
- `"default"`: Preferences appear as default.
- `"locked"`: Preferences appear as default and can't be changed.
- `"user"`: Preferences appear as changed.
- `"clear"`: Value has no effect. Resets to factory defaults on each startup.
'';
};
};

config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];

environment.etc =
let
policiesJSON = policyFormat.generate "thunderbird-policies.json" { inherit (cfg) policies; };
in
lib.mkIf (cfg.policies != { }) { "thunderbird/policies/policies.json".source = policiesJSON; };

programs.thunderbird.policies = {
DisableAppUpdate = true;
Preferences = builtins.mapAttrs (_: value: {
Value = value;
Status = cfg.preferencesStatus;
}) cfg.preferences;
};
};

meta.maintainers = with lib.maintainers; [ nydragon ];
}
1 change: 1 addition & 0 deletions nixos/modules/services/audio/mopidy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ in {
systemd.services.mopidy = {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "sound.target" ];
wants = [ "network-online.target" ];
description = "mopidy music player daemon";
serviceConfig = {
ExecStart = "${mopidyEnv}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)}";
Expand Down
Loading

0 comments on commit c2b4890

Please sign in to comment.