Move samba to server7
This commit is contained in:
parent
5a39119e2e
commit
8d1d2b5fda
|
@ -17,6 +17,7 @@ rec {
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzWhy2T7avsFf+ZS8R99kah2wPQs7MYWUP+t4VBi28a";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzWhy2T7avsFf+ZS8R99kah2wPQs7MYWUP+t4VBi28a";
|
||||||
pulsebert.publicKey =
|
pulsebert.publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG";
|
||||||
|
samba = { };
|
||||||
storage-ng.publicKey =
|
storage-ng.publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeg5ojU7U8+Lx824y+brazVJ007mEJDM7C7aUruOWGP";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeg5ojU7U8+Lx824y+brazVJ007mEJDM7C7aUruOWGP";
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
name:
|
||||||
|
|
||||||
|
(import ../outer-defaults.nix name) // {
|
||||||
|
|
||||||
|
bindMounts."/srv/c3d2" = {
|
||||||
|
hostPath = "/srv/ceph/c3d2";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = { config, pkgs, lib, ... }: {
|
||||||
|
imports = [ ../inner-defaults.nix ];
|
||||||
|
|
||||||
|
c3d2.hq.statistics.enable = true;
|
||||||
|
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
enableNmbd = true;
|
||||||
|
extraConfig = ''
|
||||||
|
workgroup = WORKGROUP
|
||||||
|
server string = storage
|
||||||
|
netbios name = storage
|
||||||
|
hosts allow = 172.20 172.22 172.22.99.146
|
||||||
|
hosts deny = 0.0.0.0/0
|
||||||
|
guest account = k-ot
|
||||||
|
map to guest = Bad user
|
||||||
|
'';
|
||||||
|
shares = {
|
||||||
|
c3d2 = {
|
||||||
|
path = "/srv/c3d2";
|
||||||
|
browseable = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -133,42 +133,14 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.samba = {
|
|
||||||
enable = false; # samba is garbage
|
|
||||||
enableNmbd = true;
|
|
||||||
extraConfig = ''
|
|
||||||
workgroup = WORKGROUP
|
|
||||||
server string = storage
|
|
||||||
netbios name = storage
|
|
||||||
hosts allow = 172.20 172.22 172.22.99.146
|
|
||||||
hosts deny = 0.0.0.0/0
|
|
||||||
guest account = k-ot
|
|
||||||
map to guest = Bad user
|
|
||||||
'';
|
|
||||||
shares = {
|
|
||||||
c3d2 = {
|
|
||||||
path = "/mnt/cephfs/c3d2";
|
|
||||||
browseable = "yes";
|
|
||||||
"read only" = "no";
|
|
||||||
"guest ok" = "yes";
|
|
||||||
"create mask" = "0644";
|
|
||||||
"directory mask" = "0755";
|
|
||||||
"force user" = "k-ot";
|
|
||||||
"force group" = "k-ot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/* # Open ports in the firewall.
|
/* # Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
23
|
23
|
||||||
80
|
80
|
||||||
443
|
443
|
||||||
137 138 445 139 # samba
|
|
||||||
];
|
];
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [
|
||||||
69
|
69
|
||||||
137 138 445 139 # samba
|
|
||||||
];
|
];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue