mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
Merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
04d9c6edec
15 changed files with 176 additions and 81 deletions
38
modules/services/nfs.nix
Normal file
38
modules/services/nfs.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services = {
|
||||
# Network shares
|
||||
samba = {
|
||||
package = pkgs.samba4Full;
|
||||
# ^^ `samba4Full` is compiled with avahi, ldap, AD etc support (compared to the default package, `samba`
|
||||
# Required for samba to register mDNS records for auto discovery
|
||||
# See https://github.com/NixOS/nixpkgs/blob/592047fc9e4f7b74a4dc85d1b9f5243dfe4899e3/pkgs/top-level/all-packages.nix#L27268
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
shares.main = {
|
||||
path = "/spinners/rootvol/nfs";
|
||||
writable = "true";
|
||||
comment = "Hello world!";
|
||||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
samba-wsdd = {
|
||||
# This enables autodiscovery on windows since SMB1 (and thus netbios) support was discontinued
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue