have bolty host videos for everyone

This commit is contained in:
Cyryl Płotnicki 2023-12-08 10:01:29 +00:00
parent 4930701d61
commit 6c0aebab4f
2 changed files with 48 additions and 7 deletions

View file

@ -5,12 +5,52 @@
lib,
...
}: {
users.users.sambaguest = {
isNormalUser = true;
extraGroups = [
];
home = "/data/shares/";
};
networking.firewall.enable = true;
networking.firewall.allowPing = true;
services.samba = {
enable = true;
nsswins = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = smbnix
netbios name = smbnix
security = user
#use sendfile = yes
#max protocol = smb2
# note: localhost is the ipv6 localhost ::1
hosts allow = 10.0.0. 100. 127.0.0.1 localhost
hosts deny = 0.0.0.0/0
guest account = sambaguest
map to guest = bad user
'';
shares = {
videos = {
path = "/data/shares/videos";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "sambaguest";
};
};
openFirewall = true;
};
networking.firewall.allowedTCPPorts = [2049];
services.nfs.server.enable = true;
services.nfs.server.exports = ''
services.nfs.server = {
enable = true;
exports = ''
/data/nfs 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/share 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/media 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/backups 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
'';
};
}

View file

@ -9,6 +9,7 @@
udev.packages = [pkgs.android-udev-rules];
ratbagd.enable = true;
gvfs.enable = true;
fwupd = {
enable = true;
package = pkgs.fwupd;