added smb for Qwark

This commit is contained in:
yaroslav
2025-06-11 00:49:33 +03:00
parent 89a7263d34
commit d587cfd246
2 changed files with 48 additions and 0 deletions
+1
View File
@@ -91,6 +91,7 @@
./hosts/generic/configuration_generic.nix ./hosts/generic/configuration_generic.nix
./hosts/generic/users.nix ./hosts/generic/users.nix
./hosts/Quark/Quark-hardware.nix ./hosts/Quark/Quark-hardware.nix
./hosts/Quark/smb.nix
./hosts/generic/virtualization.nix ./hosts/generic/virtualization.nix
# hm-stable.nixosModules.home-manager { # hm-stable.nixosModules.home-manager {
# home-manager.useUserPackages = true; # home-manager.useUserPackages = true;
+47
View File
@@ -0,0 +1,47 @@
{ ... }:
{
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = "Qwark";
"netbios name" = "qwark";
"security" = "user";
#"use sendfile" = "yes";
#"max protocol" = "smb2";
# note: localhost is the ipv6 localhost ::1
"hosts allow" = "192.168.0. 127.0.0.1 localhost 192.168.122.2";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
};
"private" = {
"path" = "/vol/dad";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "yaroslav";
"force group" = "users";
};
};
};
services.samba-wsdd = {
enable = true;
openFirewall = true;
};
services.avahi = {
publish.enable = true;
publish.userServices = true;
# ^^ Needed to allow samba to automatically register mDNS records (without the need for an `extraServiceFile`
nssmdns4 = true;
# ^^ Not one hundred percent sure if this is needed- if it aint broke, don't fix it
enable = true;
openFirewall = true;
};
}