Setup samba homes share

This commit is contained in:
Nathan McCarty 2023-07-03 23:42:15 -04:00
parent e9eb8cc17a
commit 5c045618d4
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 30 additions and 1 deletions

View File

@ -8,6 +8,15 @@ let
"10de:1ad9" # Usb ???? "10de:1ad9" # Usb ????
]; ];
in { in {
##
## Packages
##
environment.systemPackages = with pkgs; [
# Looking glass, avoids the need for another monitor
looking-glass-client
# For samba
cifs-utils
];
## ##
## Kernel configuration ## Kernel configuration
## ##
@ -25,7 +34,6 @@ in {
## ##
## Virtualization setup ## Virtualization setup
## ##
environment.systemPackages = with pkgs; [ looking-glass-client ];
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd = { virtualisation.libvirtd = {
qemu = { qemu = {
@ -55,4 +63,25 @@ in {
}; };
networking.defaultGateway = "10.0.4.1"; networking.defaultGateway = "10.0.4.1";
networking.nameservers = [ "10.0.0.10" ]; 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";
};
};
};
} }