Skip to content

Commit 6ca18ce

Browse files
zfs: Fix samba freeform settings and 2.1 build (#340165)
2 parents c254ef6 + cf572e0 commit 6ca18ce

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

nixos/tests/zfs.nix

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ let
4545
specialisation.samba.configuration = {
4646
services.samba = {
4747
enable = true;
48-
extraConfig = ''
49-
registry shares = yes
50-
usershare path = ${usersharePath}
51-
usershare allow guests = yes
52-
usershare max shares = 100
53-
usershare owner only = no
54-
'';
48+
settings.global = {
49+
"registry shares" = true;
50+
"usershare path" = "${usersharePath}";
51+
"usershare allow guests" = true;
52+
"usershare max shares" = "100";
53+
"usershare owner only" = false;
54+
};
5555
};
5656
systemd.services.samba-smbd.serviceConfig.ExecStartPre =
5757
"${pkgs.coreutils}/bin/mkdir -m +t -p ${usersharePath}";
@@ -213,8 +213,8 @@ in {
213213
enableSystemdStage1 = true;
214214
};
215215

216-
installerBoot = (import ./installer.nix { }).separateBootZfs;
217-
installer = (import ./installer.nix { }).zfsroot;
216+
installerBoot = (import ./installer.nix { inherit system; }).separateBootZfs;
217+
installer = (import ./installer.nix { inherit system; }).zfsroot;
218218

219219
expand-partitions = makeTest {
220220
name = "multi-disk-zfs";

pkgs/os-specific/linux/zfs/generic.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,11 @@ let
182182
# Remove tests because they add a runtime dependency on gcc
183183
rm -rf $out/share/zfs/zfs-tests
184184
185-
# Add Bash completions.
186-
install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs
187-
'' + optionalString (lib.versionOlder version "2.2.6") ''
188-
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
185+
${optionalString (lib.versionOlder version "2.2") ''
186+
# Add Bash completions.
187+
install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs
188+
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
189+
''}
189190
'';
190191

191192
postFixup = let

0 commit comments

Comments
 (0)