Move individual custom firewall rules to their own service files
This commit is contained in:
parent
7635beefb7
commit
505298331e
7 changed files with 61 additions and 43 deletions
|
@ -1,14 +1,24 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./user ];
|
||||
|
||||
services.nfs.server = {
|
||||
enable = config.system.fileserver.enable;
|
||||
exports = ''
|
||||
/storage/Files *(rw,sync,no_subtree_check)
|
||||
/storage/Media *(rw,sync,no_subtree_check)
|
||||
/storage/Music *(rw,sync,no_subtree_check)
|
||||
/srv/minecraft *(rw,sync,no_subtree_check)
|
||||
'';
|
||||
config = lib.mkIf config.system.fileserver.enable {
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/storage/Files *(rw,sync,no_subtree_check)
|
||||
/storage/Media *(rw,sync,no_subtree_check)
|
||||
/storage/Music *(rw,sync,no_subtree_check)
|
||||
/srv/minecraft *(rw,sync,no_subtree_check)
|
||||
'';
|
||||
};
|
||||
networking.nftables.tables.nfs = {
|
||||
family = "inet";
|
||||
content = ''
|
||||
chain input {
|
||||
ip saddr 10.0.0.0/8 tcp dport 2049 accept comment "Accept NFS"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue