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 Sep 22, 2021
2 parents 2505488 + 09a7436 commit 42ade1c
Show file tree
Hide file tree
Showing 62 changed files with 384 additions and 127 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/config/krb5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ in {
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
Expand Down
11 changes: 9 additions & 2 deletions nixos/modules/programs/atop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,15 @@ in
// 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";
};
};
}
);
}
2 changes: 1 addition & 1 deletion nixos/modules/programs/plotinus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in
###### 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" ];
};
}
43 changes: 24 additions & 19 deletions nixos/modules/services/cluster/kubernetes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,33 @@ with lib;
let
cfg = config.services.kubernetes;

defaultContainerdConfigFile = pkgs.writeText "containerd.toml" ''
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0
[grpc]
address = "/run/containerd/containerd.sock"
defaultContainerdSettings = {
version = 2;
root = "/var/lib/containerd";
state = "/run/containerd";
oom_score = 0;

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";
Expand Down Expand Up @@ -248,7 +253,7 @@ in {
(mkIf cfg.kubelet.enable {
virtualisation.containerd = {
enable = mkDefault true;
configFile = mkDefault defaultContainerdConfigFile;
settings = mkDefault defaultContainerdSettings;
};
})

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/networking/dnscrypt-wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ in {
home = "${dataDir}";
createHome = true;
isSystemUser = true;
group = "dnscrypt-wrapper";
};
users.groups.dnscrypt-wrapper = { };

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/flannel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ in {
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
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/search/meilisearch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
in
{

meta.maintainers = with maintainers; [ filalex77 ];
meta.maintainers = with maintainers; [ Br1ght0ne ];

###### interface

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/system/kerberos/heimdal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ in
{
# 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" ];
Expand Down
1 change: 0 additions & 1 deletion nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ in
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 {};
Expand Down
2 changes: 0 additions & 2 deletions nixos/tests/atop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ let assertions = rec {
};
in
{
name = "atop";

justThePackage = makeTest {
name = "atop-justThePackage";
machine = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/cntr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
makeTest {
name = "cntr-${backend}";

meta = { maintainers = with lib.maintainers; [ srk mic92 ]; };
meta = { maintainers = with lib.maintainers; [ sorki mic92 ]; };

nodes = {
${backend} = { pkgs, ... }: {
Expand Down
5 changes: 5 additions & 0 deletions nixos/tests/ec2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ let
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; ( [
Expand Down
4 changes: 2 additions & 2 deletions nixos/tests/enlightenment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
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";
Expand Down
4 changes: 1 addition & 3 deletions nixos/tests/hardened.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
import ./make-test-python.nix ({ pkgs, ... } : {
name = "hardened";
meta = with pkgs.lib.maintainers; {
maintainers = [ joachifm ];
Expand All @@ -10,8 +10,6 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
{ 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 ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/kerberos/heimdal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ../make-test-python.nix ({pkgs, ...}: {
};
krb5 = {
enable = true;
kerberos = pkgs.heimdalFull;
kerberos = pkgs.heimdal;
libdefaults = {
default_realm = "FOO.BAR";
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/meilisearch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
'';
in {
name = "meilisearch";
meta.maintainers = with lib.maintainers; [ filalex77 ];
meta.maintainers = with lib.maintainers; [ Br1ght0ne ];

machine = { ... }: {
environment.systemPackages = with pkgs; [ curl jq ];
Expand Down
5 changes: 4 additions & 1 deletion nixos/tests/minio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ in {
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 ];

Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/mpv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
{
environment.systemPackages = [
pkgs.curl
(pkgs.mpv-with-scripts.override {
(pkgs.wrapMpv pkgs.mpv-unwrapped {
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
})
];
Expand Down
16 changes: 13 additions & 3 deletions nixos/tests/mysql/mariadb-galera-mariabackup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ let
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; {
Expand All @@ -17,6 +27,7 @@ in {
galera_01 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -31,7 +42,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
Expand Down Expand Up @@ -75,6 +85,7 @@ in {
galera_02 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -89,7 +100,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
Expand Down Expand Up @@ -122,6 +132,7 @@ in {
galera_03 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -136,7 +147,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
Expand Down
16 changes: 13 additions & 3 deletions nixos/tests/mysql/mariadb-galera-rsync.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ let
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; {
Expand All @@ -17,6 +27,7 @@ in {
galera_04 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -31,7 +42,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
Expand Down Expand Up @@ -70,6 +80,7 @@ in {
galera_05 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -84,7 +95,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
Expand Down Expand Up @@ -116,6 +126,7 @@ in {
galera_06 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
Expand All @@ -130,7 +141,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
Expand Down
Loading

0 comments on commit 42ade1c

Please sign in to comment.