46 lines
919 B
Nix
46 lines
919 B
Nix
name:
|
|
|
|
(import ../outer-defaults.nix name) // {
|
|
|
|
bindMounts."/srv/files" = {
|
|
hostPath = "/srv/ceph/c3d2/files";
|
|
isReadOnly = true;
|
|
};
|
|
|
|
config = { config, pkgs, lib, ... }: {
|
|
imports = [ ../inner-defaults.nix ];
|
|
|
|
c3d2.hq.statistics.enable = true;
|
|
|
|
networking = {
|
|
useDHCP = false;
|
|
interfaces.eth0.useDHCP = true;
|
|
};
|
|
|
|
services.samba = {
|
|
enable = true;
|
|
enableNmbd = true;
|
|
extraConfig = ''
|
|
workgroup = HQ
|
|
server string = storage
|
|
netbios name = storage
|
|
hosts allow = 172.20.0.0/14 127.0.0.0/8
|
|
hosts deny = 0.0.0.0/0
|
|
guest account = nobody
|
|
map to guest = Bad user
|
|
'';
|
|
shares = {
|
|
c3d2 = {
|
|
path = "/srv/files";
|
|
browseable = "yes";
|
|
"read only" = "yes";
|
|
"guest ok" = "yes";
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.firewall.enable = false;
|
|
};
|
|
|
|
}
|