What a clusterfuck
This commit is contained in:
parent
91f88b8bb2
commit
f29273be22
221 changed files with 779 additions and 956 deletions
7
modules/system/services/fileserver/local/default.nix
Normal file
7
modules/system/services/fileserver/local/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nfs
|
||||
./samba
|
||||
];
|
||||
}
|
9
modules/system/services/fileserver/local/nfs/default.nix
Normal file
9
modules/system/services/fileserver/local/nfs/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/export/JimboNFS *(rw,no_subtree_check)
|
||||
'';
|
||||
};
|
||||
}
|
36
modules/system/services/fileserver/local/samba/default.nix
Normal file
36
modules/system/services/fileserver/local/samba/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
services = {
|
||||
samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = JimSMB
|
||||
security = user
|
||||
hosts allow = ${outputs.ips.localSpan}. 127.0.0.1 localhost
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
'';
|
||||
shares = {
|
||||
roms = {
|
||||
comment = "Samba share with my ROMs";
|
||||
path = "/export/JimboNFS/Downloads/GameFiles/ROMS";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Advertise to Windows
|
||||
samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue