From 5c045618d41d877451f2d43c2bb013c1b389e7a5 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 3 Jul 2023 23:42:15 -0400 Subject: [PATCH] Setup samba homes share --- machines/levitation/passthrough.nix | 31 ++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/machines/levitation/passthrough.nix b/machines/levitation/passthrough.nix index 227b0e9..47363c0 100644 --- a/machines/levitation/passthrough.nix +++ b/machines/levitation/passthrough.nix @@ -8,6 +8,15 @@ let "10de:1ad9" # Usb ???? ]; in { + ## + ## Packages + ## + environment.systemPackages = with pkgs; [ + # Looking glass, avoids the need for another monitor + looking-glass-client + # For samba + cifs-utils + ]; ## ## Kernel configuration ## @@ -25,7 +34,6 @@ in { ## ## Virtualization setup ## - environment.systemPackages = with pkgs; [ looking-glass-client ]; virtualisation.spiceUSBRedirection.enable = true; virtualisation.libvirtd = { qemu = { @@ -55,4 +63,25 @@ in { }; networking.defaultGateway = "10.0.4.1"; networking.nameservers = [ "10.0.0.10" ]; + + ## + ## Samba share + ## + services.samba = { + enable = true; + openFirewall = true; + extraConfig = '' + browseable = yes + smb encrypt = required + ''; + shares = { + # You will still need to set up the user accounts to begin with: + # $ sudo smbpasswd -a yourusername + homes = { + browseable = "no"; + "read only" = "no"; + "guest ok" = "no"; + }; + }; + }; }