nixos/kelder: Add Samba
This commit is contained in:
parent
3f3d27d5bd
commit
dd31b95945
@ -121,6 +121,20 @@ in
|
|||||||
username = "token";
|
username = "token";
|
||||||
passwordFile = config.age.secrets."kelder/ddclient-cloudflare.key".path;
|
passwordFile = config.age.secrets."kelder/ddclient-cloudflare.key".path;
|
||||||
};
|
};
|
||||||
|
samba = {
|
||||||
|
enable = true;
|
||||||
|
enableNmbd = true;
|
||||||
|
shares = {
|
||||||
|
storage = {
|
||||||
|
path = "/mnt/storage";
|
||||||
|
browseable = "yes";
|
||||||
|
writeable = "yes";
|
||||||
|
"create mask" = "0664";
|
||||||
|
"directory mask" = "0775";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
samba-wsdd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
@ -246,6 +260,12 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
extraRules = ''
|
extraRules = ''
|
||||||
|
table inet filter {
|
||||||
|
chain input {
|
||||||
|
iifname et1g0 tcp dport { 139, 445, 5357 } accept
|
||||||
|
iifname et1g0 udp dport { 137, 138, 3702 } accept
|
||||||
|
}
|
||||||
|
}
|
||||||
table inet raw {
|
table inet raw {
|
||||||
chain prerouting {
|
chain prerouting {
|
||||||
type filter hook prerouting priority mangle; policy accept;
|
type filter hook prerouting priority mangle; policy accept;
|
||||||
|
@ -195,6 +195,12 @@ in
|
|||||||
(mkIf config.services.mastodon.enable {
|
(mkIf config.services.mastodon.enable {
|
||||||
my.tmproot.unsaved.ignore = [ "/var/lib/mastodon/.secrets_env" ];
|
my.tmproot.unsaved.ignore = [ "/var/lib/mastodon/.secrets_env" ];
|
||||||
})
|
})
|
||||||
|
(mkIf config.services.ddclient.enable {
|
||||||
|
my.tmproot.unsaved.ignore = [ "/var/lib/private/ddclient" ];
|
||||||
|
})
|
||||||
|
(mkIf config.services.samba.enable {
|
||||||
|
my.tmproot.unsaved.ignore = [ "/var/cache/samba" ];
|
||||||
|
})
|
||||||
(mkIf config.my.build.isDevVM {
|
(mkIf config.my.build.isDevVM {
|
||||||
my.tmproot.unsaved.ignore = [ "/nix" ];
|
my.tmproot.unsaved.ignore = [ "/nix" ];
|
||||||
|
|
||||||
@ -402,6 +408,11 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
(mkIf config.services.samba.enable {
|
||||||
|
my.tmproot.persistence.config.directories = [
|
||||||
|
"/var/lib/samba"
|
||||||
|
];
|
||||||
|
})
|
||||||
]))
|
]))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user