aplysia: enable samba
This commit is contained in:
parent
e11c4f4013
commit
77ebc6179a
43
aplysia.nix
43
aplysia.nix
@ -6,11 +6,12 @@
|
|||||||
./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 = {
|
||||||
|
enable = true;
|
||||||
|
version = 2;
|
||||||
|
zfsSupport = true;
|
||||||
|
mirroredBoots = [
|
||||||
{ devices = [ "/dev/sda" ]; path = "/boota"; }
|
{ devices = [ "/dev/sda" ]; path = "/boota"; }
|
||||||
{ devices = [ "/dev/sdb" ]; path = "/bootb"; }
|
{ devices = [ "/dev/sdb" ]; path = "/bootb"; }
|
||||||
{ devices = [ "/dev/sdc" ]; path = "/bootc"; }
|
{ devices = [ "/dev/sdc" ]; path = "/bootc"; }
|
||||||
@ -18,19 +19,47 @@
|
|||||||
{ devices = [ "/dev/sde" ]; path = "/boote"; }
|
{ devices = [ "/dev/sde" ]; path = "/boote"; }
|
||||||
{ devices = [ "/dev/sdf" ]; path = "/bootf"; }
|
{ 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 ];
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user