aplysia: enable samba

This commit is contained in:
Gabriel Ebner 2017-08-05 10:27:17 +02:00
parent e11c4f4013
commit 77ebc6179a

@ -6,31 +6,60 @@
./common-headless.nix ./common-headless.nix
]; ];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.zfsSupport = true;
boot.supportedFilesystems = ["zfs"]; boot.supportedFilesystems = ["zfs"];
boot.loader.grub.mirroredBoots = [ boot.loader.grub = {
{ devices = [ "/dev/sda" ]; path = "/boota"; } enable = true;
{ devices = [ "/dev/sdb" ]; path = "/bootb"; } version = 2;
{ devices = [ "/dev/sdc" ]; path = "/bootc"; } zfsSupport = true;
{ devices = [ "/dev/sdd" ]; path = "/bootd"; } mirroredBoots = [
{ devices = [ "/dev/sde" ]; path = "/boote"; } { devices = [ "/dev/sda" ]; path = "/boota"; }
{ devices = [ "/dev/sdf" ]; path = "/bootf"; } { devices = [ "/dev/sdb" ]; path = "/bootb"; }
]; { devices = [ "/dev/sdc" ]; path = "/bootc"; }
{ devices = [ "/dev/sdd" ]; path = "/bootd"; }
{ devices = [ "/dev/sde" ]; path = "/boote"; }
{ devices = [ "/dev/sdf" ]; path = "/bootf"; }
];
};
networking.hostName = "aplysia"; # Define your hostname. networking = {
networking.hostId = "34a820f1"; hostName = "aplysia";
hostId = "34a820f1";
};
services.openssh.enable = true; services.openssh.enable = true;
users.extraUsers.gebner = { users.extraUsers.gebner = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel"]; extraGroups = ["wheel" "transmission"];
}; };
boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages; boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
system.stateVersion = "17.03"; system.stateVersion = "17.03";
fileSystems."/mnt/aplysia" = pkgs.lib.mkOverride 10 {
device = "aplysia/export";
fsType = "zfs";
};
services.samba = {
enable = true;
extraConfig = ''
passdb backend = tdbsam
unix password sync = no
'';
shares = {
export = {
"guest ok" = "no";
path = "/mnt/aplysia";
};
};
};
networking.firewall = {
# samba
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
};
} }