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 Apr 22, 2023
2 parents 28227b7 + 3e042b7 commit 56aa873
Show file tree
Hide file tree
Showing 56 changed files with 263 additions and 181 deletions.
1 change: 1 addition & 0 deletions lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ rec {
pulseSupport = false;
smbdSupport = false;
seccompSupport = false;
enableDocs = false;
hostCpuTargets = [ "${final.qemuArch}-linux-user" ];
};
wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;
Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/programs/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ in
nativeMessagingHosts = mapAttrs (_: v: mkEnableOption (mdDoc v)) {
browserpass = "Browserpass support";
bukubrow = "Bukubrow support";
euwebid = "Web eID support";
ff2mpv = "ff2mpv support";
fxCast = "fx_cast support";
gsconnect = "GSConnect support";
Expand All @@ -217,6 +218,8 @@ in
extraPrefs = cfg.autoConfig;
extraNativeMessagingHosts = with pkgs; optionals nmh.ff2mpv [
ff2mpv
] ++ optionals nmh.euwebid [
web-eid-app
] ++ optionals nmh.gsconnect [
gnomeExtensions.gsconnect
] ++ optionals nmh.jabref [
Expand All @@ -230,6 +233,7 @@ in
nixpkgs.config.firefox = {
enableBrowserpass = nmh.browserpass;
enableBukubrow = nmh.bukubrow;
enableEUWebID = nmh.euwebid;
enableTridactylNative = nmh.tridactyl;
enableUgetIntegrator = nmh.ugetIntegrator;
enableFXCastBridge = nmh.fxCast;
Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/services/networking/iscsi/root-initiator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ in
assertion = cfg.loginAll -> cfg.target == null;
message = "iSCSI target name is set while login on all portals is enabled.";
}
{
assertion = !config.boot.initrd.systemd.enable;
message = "systemd stage 1 does not support iscsi yet.";
}
];
};
}
5 changes: 5 additions & 0 deletions nixos/modules/system/boot/grow-partition.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ with lib;

config = mkIf config.boot.growPartition {

assertions = [{
assertion = !config.boot.initrd.systemd.enable;
message = "systemd stage 1 does not support 'boot.growPartition' yet.";
}];

boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.gawk}/bin/gawk
copy_bin_and_libs ${pkgs.gnused}/bin/sed
Expand Down
25 changes: 15 additions & 10 deletions nixos/modules/system/boot/networkd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2944,41 +2944,45 @@ let
value.source = "${cfg.units.${name}.unit}/${name}";
}) (attrNames cfg.units));

commonOptions = {
commonOptions = visible: {

systemd.network.enable = mkOption {
enable = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc ''
Whether to enable networkd or not.
'';
};

systemd.network.links = mkOption {
links = mkOption {
default = {};
inherit visible;
type = with types; attrsOf (submodule [ { options = linkOptions; } ]);
description = lib.mdDoc "Definition of systemd network links.";
};

systemd.network.netdevs = mkOption {
netdevs = mkOption {
default = {};
inherit visible;
type = with types; attrsOf (submodule [ { options = netdevOptions; } ]);
description = lib.mdDoc "Definition of systemd network devices.";
};

systemd.network.networks = mkOption {
networks = mkOption {
default = {};
inherit visible;
type = with types; attrsOf (submodule [ { options = networkOptions; } networkConfig ]);
description = lib.mdDoc "Definition of systemd networks.";
};

systemd.network.config = mkOption {
config = mkOption {
default = {};
inherit visible;
type = with types; submodule [ { options = networkdOptions; } networkdConfig ];
description = lib.mdDoc "Definition of global systemd network config.";
};

systemd.network.units = mkOption {
units = mkOption {
description = lib.mdDoc "Definition of networkd units.";
default = {};
internal = true;
Expand All @@ -2991,7 +2995,7 @@ let
}));
};

systemd.network.wait-online = {
wait-online = {
enable = mkOption {
type = types.bool;
default = true;
Expand Down Expand Up @@ -3225,8 +3229,9 @@ let
in

{
options = commonOptions // {
boot.initrd = commonOptions;
options = {
systemd.network = commonOptions true;
boot.initrd.systemd.network = commonOptions "shallow";
};

config = mkMerge [
Expand Down
63 changes: 39 additions & 24 deletions nixos/modules/system/boot/systemd/initrd.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, config, utils, pkgs, ... }:
{ lib, options, config, utils, pkgs, ... }:

with lib;

Expand Down Expand Up @@ -126,18 +126,20 @@ in {
options.boot.initrd.systemd = {
enable = mkEnableOption (lib.mdDoc "systemd in initrd") // {
description = lib.mdDoc ''
Whether to enable systemd in initrd.
Note: This is in very early development and is highly
experimental. Most of the features NixOS supports in initrd are
not yet supported by the intrd generated with this option.
Whether to enable systemd in initrd. The unit options such as
{option}`boot.initrd.systemd.services` are the same as their
stage 2 counterparts such as {option}`systemd.services`,
except that `restartTriggers` and `reloadTriggers` are not
supported.
Note: This is experimental. Some of the `boot.initrd` options
are not supported when this is enabled, and the options under
`boot.initrd.systemd` are subject to change.
'';
};

package = (mkPackageOptionMD pkgs "systemd" {
package = mkPackageOptionMD pkgs "systemd" {
default = "systemdStage1";
}) // {
visible = false;
};

extraConfig = mkOption {
Expand Down Expand Up @@ -167,7 +169,6 @@ in {
"/etc/hostname".text = "mymachine";
}
'';
visible = false;
default = {};
type = utils.systemdUtils.types.initrdContents;
};
Expand Down Expand Up @@ -217,7 +218,6 @@ in {

emergencyAccess = mkOption {
type = with types; oneOf [ bool (nullOr (passwdEntry str)) ];
visible = false;
description = lib.mdDoc ''
Set to true for unauthenticated emergency access, and false for
no emergency access.
Expand All @@ -231,7 +231,6 @@ in {
initrdBin = mkOption {
type = types.listOf types.package;
default = [];
visible = false;
description = lib.mdDoc ''
Packages to include in /bin for the stage 1 emergency shell.
'';
Expand All @@ -240,7 +239,6 @@ in {
additionalUpstreamUnits = mkOption {
default = [ ];
type = types.listOf types.str;
visible = false;
example = [ "debug-shell.service" "systemd-quotacheck.service" ];
description = lib.mdDoc ''
Additional units shipped with systemd that shall be enabled.
Expand All @@ -251,7 +249,6 @@ in {
default = [ ];
type = types.listOf types.str;
example = [ "systemd-backlight@.service" ];
visible = false;
description = lib.mdDoc ''
A list of units to skip when generating system systemd configuration directory. This has
priority over upstream units, {option}`boot.initrd.systemd.units`, and
Expand All @@ -264,57 +261,56 @@ in {
units = mkOption {
description = lib.mdDoc "Definition of systemd units.";
default = {};
visible = false;
visible = "shallow";
type = systemdUtils.types.units;
};

packages = mkOption {
default = [];
visible = false;
type = types.listOf types.package;
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]";
description = lib.mdDoc "Packages providing systemd units and hooks.";
};

targets = mkOption {
default = {};
visible = false;
visible = "shallow";
type = systemdUtils.types.initrdTargets;
description = lib.mdDoc "Definition of systemd target units.";
};

services = mkOption {
default = {};
type = systemdUtils.types.initrdServices;
visible = false;
visible = "shallow";
description = lib.mdDoc "Definition of systemd service units.";
};

sockets = mkOption {
default = {};
type = systemdUtils.types.initrdSockets;
visible = false;
visible = "shallow";
description = lib.mdDoc "Definition of systemd socket units.";
};

timers = mkOption {
default = {};
type = systemdUtils.types.initrdTimers;
visible = false;
visible = "shallow";
description = lib.mdDoc "Definition of systemd timer units.";
};

paths = mkOption {
default = {};
type = systemdUtils.types.initrdPaths;
visible = false;
visible = "shallow";
description = lib.mdDoc "Definition of systemd path units.";
};

mounts = mkOption {
default = [];
type = systemdUtils.types.initrdMounts;
visible = false;
visible = "shallow";
description = lib.mdDoc ''
Definition of systemd mount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
Expand All @@ -325,7 +321,7 @@ in {
automounts = mkOption {
default = [];
type = systemdUtils.types.automounts;
visible = false;
visible = "shallow";
description = lib.mdDoc ''
Definition of systemd automount units.
This is a list instead of an attrSet, because systemd mandates the names to be derived from
Expand All @@ -336,12 +332,31 @@ in {
slices = mkOption {
default = {};
type = systemdUtils.types.slices;
visible = false;
visible = "shallow";
description = lib.mdDoc "Definition of slice configurations.";
};
};

config = mkIf (config.boot.initrd.enable && cfg.enable) {
assertions = map (name: {
assertion = config.boot.initrd.${name} == "";
message = ''
systemd stage 1 does not support 'boot.initrd.${name}'. Please
convert it to analogous systemd units in 'boot.initrd.systemd'.
Definitions:
${lib.concatMapStringsSep "\n" ({ file, ... }: "- ${file}") options.boot.initrd.${name}.definitionsWithLocations}
'';
}) [
"preFailCommands"
"preDeviceCommands"
"preLVMCommands"
"postDeviceCommands"
"postMountCommands"
"extraUtilsCommands"
"extraUtilsCommandsTest"
];

system.build = { inherit initialRamdisk; };

boot.initrd.availableKernelModules = [
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/audio/musikcube/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

stdenv.mkDerivation rec {
pname = "musikcube";
version = "0.99.7";
version = "3.0.0";

src = fetchFromGitHub {
owner = "clangen";
repo = pname;
rev = version;
sha256 = "sha256-bsvq48zTNafsQGFXVApCEWIL8H2RXiowalEu/W3DUu0=";
hash = "sha512-W+Zug1SiOGJ+o6FBf2jeDGHFj87vudR4drtjyXiOzdoM8fUCnCj4pp7+70eZGilg6CvBi7CYkbVn53LXJf5qWA==";
};

outputs = [ "out" "dev" ];
Expand Down Expand Up @@ -86,9 +86,9 @@ stdenv.mkDerivation rec {
'';

meta = with lib; {
description = "A fully functional terminal-based music player, library, and streaming audio server";
description = "Terminal-based music player, library, and streaming audio server";
homepage = "https://musikcube.com/";
maintainers = with maintainers; [ aanderse srapenne ];
maintainers = with maintainers; [ aanderse srapenne afh ];
license = licenses.bsd3;
platforms = platforms.all;
};
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/networking/browsers/firefox/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## various stuff that can be plugged in
, ffmpeg_5, xorg, alsa-lib, libpulseaudio, libcanberra-gtk3, libglvnd, libnotify, opensc
, gnome/*.gnome-shell*/
, browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, pipewire
, browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, web-eid-app, pipewire
, tridactyl-native
, fx_cast_bridge
, udev
Expand Down Expand Up @@ -65,6 +65,7 @@ let
[ ]
++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)
++ lib.optional (cfg.enableBukubrow or false) bukubrow
++ lib.optional (cfg.enableEUWebID or false) web-eid-app
++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native
++ lib.optional (cfg.enableGnomeExtensions or false) gnome-browser-connector
++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cloudflared/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

buildGoModule rec {
pname = "cloudflared";
version = "2023.4.0";
version = "2023.4.1";

src = fetchFromGitHub {
owner = "cloudflare";
repo = "cloudflared";
rev = "refs/tags/${version}";
hash = "sha256-+lmSztMstz8tYFP9rPmh99bkbCVea6wbiCrpbJUI/qc=";
hash = "sha256-PG2+rEn3X1EdMUDbfrtfEjYclErMGAGTcP2g7Jz+s1A=";
};

vendorSha256 = null;
vendorHash = null;

ldflags = [
"-s"
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/civo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

buildGoModule rec {
pname = "civo";
version = "1.0.48";
version = "1.0.49";

src = fetchFromGitHub {
owner = "civo";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-KoW+XKEFoe2QNJPu97MYYZnxbU0Wat8slJjQm/vtmew=";
sha256 = "sha256-j9fnOM7OLnu42LM/LaO/Sw9TJtPFHjAC+QzqywbxKKo=";
};

vendorHash = "sha256-QzTu6/iFK+CS8UXoXSVq3OTuwk/xcHnAX4UpCU/Scpk=";
vendorHash = "sha256-7I4V4DVdHSvr/1ic/YT+Vttreg0tFasRNT/aFe4/0OY=";

nativeBuildInputs = [ installShellFiles ];

Expand Down
Loading

0 comments on commit 56aa873

Please sign in to comment.