From 26d0f167564307a92930e42643334c21eedcda25 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 5 Aug 2017 14:28:22 +0200 Subject: [PATCH] vaccaria --- vaccaria.nix | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 vaccaria.nix diff --git a/vaccaria.nix b/vaccaria.nix new file mode 100644 index 0000000..735d79e --- /dev/null +++ b/vaccaria.nix @@ -0,0 +1,71 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./common-headless.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sdg"; # or "nodev" for efi only + + networking = { + hostName = "vaccaria"; + hostId = "3d551a7c"; + }; + + services.openssh.enable = true; + + users.extraUsers.gebner = { + isNormalUser = true; + extraGroups = ["wheel" "transmission"]; + }; + + boot.supportedFilesystems = ["zfs"]; + boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages; + + system.stateVersion = "17.03"; + + fileSystems."/mnt/vaccaria" = pkgs.lib.mkOverride 10 { + device = "vaccaria/export"; + fsType = "zfs"; + }; + +# services.samba = { +# enable = true; +# extraConfig = '' +# passdb backend = tdbsam +# unix password sync = no +# ''; +# shares = { +# export = { +# "guest ok" = "no"; +# path = "/mnt/aplysia"; +# }; +# }; +# }; + +# services.transmission = { +# enable = true; +# settings = { +# download-dir = "/mnt/aplysia/torrents"; +# incomplete-dir = "/mnt/aplysia/torrents"; +# }; +# }; + + networking.firewall = { + allowedTCPPorts = [ + 445 139 # samba + ]; + allowedUDPPorts = [ + 137 138 # samba + ]; + }; + + environment.systemPackages = with pkgs; [ + transmission + samba + ]; + +}