Merge #138918: Fix several NixOS errors in Hydra evaluation

In particular, this should unblock the trunk-combined jobset.

+1 -1
nixos/modules/config/krb5/default.nix
···
type = types.package;
default = pkgs.krb5Full;
defaultText = "pkgs.krb5Full";
-
example = literalExample "pkgs.heimdalFull";
+
example = literalExample "pkgs.heimdal";
description = ''
The Kerberos implementation that will be present in
<literal>environment.systemPackages</literal> after enabling this
+9 -2
nixos/modules/programs/atop.nix
···
// mkService cfg.atopgpu.enable "atopgpu" [ atop ];
timers = mkTimer cfg.atopRotateTimer.enable "atop-rotate" [ atop ];
};
-
security.wrappers =
-
lib.mkIf cfg.setuidWrapper.enable { atop = { source = "${atop}/bin/atop"; }; };
+
+
security.wrappers = lib.mkIf cfg.setuidWrapper.enable {
+
atop =
+
{ setuid = true;
+
owner = "root";
+
group = "root";
+
source = "${atop}/bin/atop";
+
};
+
};
}
);
}
+1 -1
nixos/modules/programs/plotinus.nix
···
###### implementation
config = mkIf cfg.enable {
-
environment.variables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
+
environment.sessionVariables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
environment.variables.GTK3_MODULES = [ "${pkgs.plotinus}/lib/libplotinus.so" ];
};
}
+23 -18
nixos/modules/services/cluster/kubernetes/default.nix
···
let
cfg = config.services.kubernetes;
-
defaultContainerdConfigFile = pkgs.writeText "containerd.toml" ''
-
version = 2
-
root = "/var/lib/containerd"
-
state = "/run/containerd"
-
oom_score = 0
+
defaultContainerdSettings = {
+
version = 2;
+
root = "/var/lib/containerd";
+
state = "/run/containerd";
+
oom_score = 0;
-
[grpc]
-
address = "/run/containerd/containerd.sock"
+
grpc = {
+
address = "/run/containerd/containerd.sock";
+
};
-
[plugins."io.containerd.grpc.v1.cri"]
-
sandbox_image = "pause:latest"
+
plugins."io.containerd.grpc.v1.cri" = {
+
sandbox_image = "pause:latest";
-
[plugins."io.containerd.grpc.v1.cri".cni]
-
bin_dir = "/opt/cni/bin"
-
max_conf_num = 0
+
cni = {
+
bin_dir = "/opt/cni/bin";
+
max_conf_num = 0;
+
};
-
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
-
runtime_type = "io.containerd.runc.v2"
+
containerd.runtimes.runc = {
+
runtime_type = "io.containerd.runc.v2";
+
};
-
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."io.containerd.runc.v2".options]
-
SystemdCgroup = true
-
'';
+
containerd.runtimes."io.containerd.runc.v2".options = {
+
SystemdCgroup = true;
+
};
+
};
+
};
mkKubeConfig = name: conf: pkgs.writeText "${name}-kubeconfig" (builtins.toJSON {
apiVersion = "v1";
···
(mkIf cfg.kubelet.enable {
virtualisation.containerd = {
enable = mkDefault true;
-
configFile = mkDefault defaultContainerdConfigFile;
+
settings = mkDefault defaultContainerdSettings;
};
})
+1
nixos/modules/services/networking/dnscrypt-wrapper.nix
···
home = "${dataDir}";
createHome = true;
isSystemUser = true;
+
group = "dnscrypt-wrapper";
};
users.groups.dnscrypt-wrapper = { };
+1 -1
nixos/modules/services/networking/flannel.nix
···
path = [ pkgs.iptables ];
preStart = optionalString (cfg.storageBackend == "etcd") ''
echo "setting network configuration"
-
until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
+
until ${pkgs.etcd}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
do
echo "setting network configuration, retry"
sleep 1
+1 -1
nixos/modules/services/search/meilisearch.nix
···
in
{
-
meta.maintainers = with maintainers; [ filalex77 ];
+
meta.maintainers = with maintainers; [ Br1ght0ne ];
###### interface
+1 -1
nixos/modules/services/system/kerberos/heimdal.nix
···
{
# No documentation about correct triggers, so guessing at them.
-
config = mkIf (cfg.enable && kerberos == pkgs.heimdalFull) {
+
config = mkIf (cfg.enable && kerberos == pkgs.heimdal) {
systemd.services.kadmind = {
description = "Kerberos Administration Daemon";
wantedBy = [ "multi-user.target" ];
-1
nixos/tests/all-tests.nix
···
krb5 = discoverTests (import ./krb5 {});
ksm = handleTest ./ksm.nix {};
kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {};
-
latestKernel.hardened = handleTest ./hardened.nix { latestKernel = true; };
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
leaps = handleTest ./leaps.nix {};
libreddit = handleTest ./libreddit.nix {};
-2
nixos/tests/atop.nix
···
};
in
{
-
name = "atop";
-
justThePackage = makeTest {
name = "atop-justThePackage";
machine = {
+1 -1
nixos/tests/cntr.nix
···
makeTest {
name = "cntr-${backend}";
-
meta = { maintainers = with lib.maintainers; [ srk mic92 ]; };
+
meta = { maintainers = with lib.maintainers; [ sorki mic92 ]; };
nodes = {
${backend} = { pkgs, ... }: {
+5
nixos/tests/ec2.nix
···
ln -s vda1 /dev/xvda1
'';
+
# In a NixOS test the serial console is occupied by the "backdoor"
+
# (see testing/test-instrumentation.nix) and is incompatible with
+
# the configuration in virtualisation/amazon-image.nix.
+
systemd.services."serial-getty@ttyS0".enable = mkForce false;
+
# Needed by nixos-rebuild due to the lack of network
# access. Determined by trial and error.
system.extraDependencies = with pkgs; ( [
+2 -2
nixos/tests/enlightenment.nix
···
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.desktopManager.enlightenment.enable = true;
-
services.xserver.displayManager.lightdm = {
-
enable = true;
+
services.xserver.displayManager = {
+
lightdm.enable = true;
autoLogin = {
enable = true;
user = "alice";
+1 -3
nixos/tests/hardened.nix
···
-
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
+
import ./make-test-python.nix ({ pkgs, ... } : {
name = "hardened";
meta = with pkgs.lib.maintainers; {
maintainers = [ joachifm ];
···
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
users.users.sybil = { isNormalUser = true; group = "wheel"; };
imports = [ ../modules/profiles/hardened.nix ];
-
boot.kernelPackages =
-
lib.mkIf latestKernel pkgs.linuxPackages_latest_hardened;
environment.memoryAllocator.provider = "graphene-hardened";
nix.useSandbox = false;
virtualisation.emptyDiskImages = [ 4096 ];
+1 -1
nixos/tests/kerberos/heimdal.nix
···
};
krb5 = {
enable = true;
-
kerberos = pkgs.heimdalFull;
+
kerberos = pkgs.heimdal;
libdefaults = {
default_realm = "FOO.BAR";
};
+1 -1
nixos/tests/meilisearch.nix
···
'';
in {
name = "meilisearch";
-
meta.maintainers = with lib.maintainers; [ filalex77 ];
+
meta.maintainers = with lib.maintainers; [ Br1ght0ne ];
machine = { ... }: {
environment.systemPackages = with pkgs; [ curl jq ];
+4 -1
nixos/tests/minio.nix
···
machine = { pkgs, ... }: {
services.minio = {
enable = true;
-
inherit accessKey secretKey;
+
rootCredentialsFile = pkgs.writeText "minio-credentials" ''
+
MINIO_ROOT_USER=${accessKey}
+
MINIO_ROOT_PASSWORD=${secretKey}
+
'';
};
environment.systemPackages = [ pkgs.minio-client ];
+1 -1
nixos/tests/mpv.nix
···
{
environment.systemPackages = [
pkgs.curl
-
(pkgs.mpv-with-scripts.override {
+
(pkgs.wrapMpv pkgs.mpv-unwrapped {
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
})
];
+13 -3
nixos/tests/mysql/mariadb-galera-mariabackup.nix
···
mysqlenv-common = pkgs.buildEnv { name = "mysql-path-env-common"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ bash gawk gnutar inetutils which ]; };
mysqlenv-mariabackup = pkgs.buildEnv { name = "mysql-path-env-mariabackup"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ gzip iproute2 netcat procps pv socat ]; };
+
# Common user configuration
+
users = { ... }:
+
{
+
users.users.testuser = {
+
isSystemUser = true;
+
group = "testusers";
+
};
+
users.groups.testusers = { };
+
};
+
in {
name = "mariadb-galera-mariabackup";
meta = with pkgs.lib.maintainers; {
···
galera_01 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
···
galera_02 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
···
galera_03 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
+13 -3
nixos/tests/mysql/mariadb-galera-rsync.nix
···
mysqlenv-common = pkgs.buildEnv { name = "mysql-path-env-common"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ bash gawk gnutar inetutils which ]; };
mysqlenv-rsync = pkgs.buildEnv { name = "mysql-path-env-rsync"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ lsof procps rsync stunnel ]; };
+
# Common user configuration
+
users = { ... }:
+
{
+
users.users.testuser = {
+
isSystemUser = true;
+
group = "testusers";
+
};
+
users.groups.testusers = { };
+
};
+
in {
name = "mariadb-galera-rsync";
meta = with pkgs.lib.maintainers; {
···
galera_04 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
···
galera_05 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
···
galera_06 =
{ pkgs, ... }:
{
+
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
···
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
-
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
+29 -7
nixos/tests/mysql/mysql.nix
···
-
import ./../make-test-python.nix ({ pkgs, ...} : {
+
import ./../make-test-python.nix ({ pkgs, ...}:
+
+
+
let
+
# Setup common users
+
users = { ... }:
+
{
+
users.groups.testusers = { };
+
+
users.users.testuser = {
+
isSystemUser = true;
+
group = "testusers";
+
};
+
+
users.users.testuser2 = {
+
isSystemUser = true;
+
group = "testusers";
+
};
+
};
+
+
in
+
+
{
name = "mysql";
meta = with pkgs.lib.maintainers; {
maintainers = [ eelco shlevy ];
···
{ pkgs, ... }:
{
-
users.users.testuser = { isSystemUser = true; };
-
users.users.testuser2 = { isSystemUser = true; };
+
imports = [ users ];
+
services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb3"; schema = ./testdb.sql; }
···
{ pkgs, ... }:
{
+
imports = [ users ];
+
# prevent oom:
# Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
virtualisation.memorySize = 1024;
-
users.users.testuser = { isSystemUser = true; };
-
users.users.testuser2 = { isSystemUser = true; };
services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb3"; schema = ./testdb.sql; }
···
{ pkgs, ... }:
{
-
users.users.testuser = { isSystemUser = true; };
-
users.users.testuser2 = { isSystemUser = true; };
+
imports = [ users ];
+
services.mysql.enable = true;
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
ALTER USER root@localhost IDENTIFIED WITH unix_socket;
+1 -1
nixos/tests/pantheon.nix
···
-
import ./make-test-python.nix ({ pkgs, ...} :
+
import ./make-test-python.nix ({ pkgs, lib, ...} :
{
name = "pantheon";
+1 -1
nixos/tests/postfixadmin.nix
···
import ./make-test-python.nix ({ pkgs, ...} : {
name = "postfixadmin";
-
meta = with pkgs.stdenv.lib.maintainers; {
+
meta = with pkgs.lib.maintainers; {
maintainers = [ globin ];
};
+5 -1
nixos/tests/prometheus-exporters.nix
···
WorkingDirectory = "/var/spool/mail";
};
};
-
users.users.mailexporter.isSystemUser = true;
+
users.users.mailexporter = {
+
isSystemUser = true;
+
group = "mailexporter";
+
};
+
users.groups.mailexporter = {};
};
exporterTest = ''
wait_for_unit("postfix.service")
+2
nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix
···
# DO NOT COPY THIS TO PRODUCTION AS IS. Think about it at least twice.
# Everyone on the "isp" machine will be able to add routes to the kernel.
security.wrappers.add-dhcpd-lease = {
+
owner = "root";
+
group = "root";
source = pkgs.writeShellScript "add-dhcpd-lease" ''
exec ${pkgs.iproute2}/bin/ip -6 route replace "$1" via "$2"
'';
+1 -1
nixos/tests/tigervnc.nix
···
with import ../lib/testing-python.nix { inherit system pkgs; };
makeTest {
name = "tigervnc";
-
meta = with pkgs.stdenv.lib.maintainers; {
+
meta = with pkgs.lib.maintainers; {
maintainers = [ lheckemann ];
};
+1 -1
nixos/tests/wasabibackend.nix
···
port = 18332;
};
};
-
services.bitcoind = {
+
services.bitcoind."testnet" = {
enable = true;
testnet = true;
rpc.users = {