From 1da41e937ed4ba686209e979d585c6db388cfeee Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Fri, 6 Sep 2024 14:51:34 -0400 Subject: [PATCH 1/3] nixos/tests/zfs: Fix samba freeform settings --- nixos/tests/zfs.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 851fced2c5e1..a996f85cd98c 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -45,13 +45,13 @@ let specialisation.samba.configuration = { services.samba = { enable = true; - extraConfig = '' - registry shares = yes - usershare path = ${usersharePath} - usershare allow guests = yes - usershare max shares = 100 - usershare owner only = no - ''; + settings.global = { + "registry shares" = true; + "usershare path" = "${usersharePath}"; + "usershare allow guests" = true; + "usershare max shares" = "100"; + "usershare owner only" = false; + }; }; systemd.services.samba-smbd.serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m +t -p ${usersharePath}"; From 9bd0b5ac05203d6efc2655532c75ede921b1d797 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Fri, 6 Sep 2024 16:07:34 -0400 Subject: [PATCH 2/3] nixos/tests/zfs: Fix flake build --- nixos/tests/zfs.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index a996f85cd98c..877749a8048b 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -213,8 +213,8 @@ in { enableSystemdStage1 = true; }; - installerBoot = (import ./installer.nix { }).separateBootZfs; - installer = (import ./installer.nix { }).zfsroot; + installerBoot = (import ./installer.nix { inherit system; }).separateBootZfs; + installer = (import ./installer.nix { inherit system; }).zfsroot; expand-partitions = makeTest { name = "multi-disk-zfs"; From cf572e0f31924d72264e85365c318758b81f7b73 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Fri, 6 Sep 2024 15:41:31 -0400 Subject: [PATCH 3/3] zfs: Fix bash completions with 2.1 --- pkgs/os-specific/linux/zfs/generic.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index aacebdc00138..d9cba044d501 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -182,10 +182,11 @@ let # Remove tests because they add a runtime dependency on gcc rm -rf $out/share/zfs/zfs-tests - # Add Bash completions. - install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs - '' + optionalString (lib.versionOlder version "2.2.6") '' - (cd $out/share/bash-completion/completions; ln -s zfs zpool) + ${optionalString (lib.versionOlder version "2.2") '' + # Add Bash completions. + install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs + (cd $out/share/bash-completion/completions; ln -s zfs zpool) + ''} ''; postFixup = let