diff --git a/configuration.nix b/configuration.nix index eab2797..1a8385f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -65,7 +65,7 @@ console.keyMap = "croat"; # Enable CUPS to print documents. - services.printing.enable = true; + services.printing.enable = false; # Enable sound with pipewire. services.pulseaudio.enable = false; @@ -83,6 +83,59 @@ #media-session.enable = true; }; + services.samba = { + enable = true; + securityType = "user"; + openFirewall = true; + settings = { + global = { + "workgroup" = "SAMBA"; + "security" = "user"; + "passdb backend" = "tdbsam"; + "vfs objects" = "acl_xattr"; + "map acl inherit" = "yes"; + "store dos attributes" = "yes"; + }; + "data" = { + "path" = "/mnt/data"; + "read only" = "no"; + "browsable" = "yes"; + "guest ok" = "no"; + "writable" = "yes"; + "valid users" = "dave,jana"; + }; + "dave" = { + "path" = "/home/dave"; + "read only" = "no"; + "browsable" = "yes"; + "guest ok" = "no"; + "writable" = "yes"; + "valid users" = "dave,jana"; + }; + "homework" = { + "path" = "/mnt/data/docker/volumes/captain--sync-data/_data/Homework"; + "read only" = "no"; + "browsable" = "yes"; + "guest ok" = "no"; + "writable" = "yes"; + "valid users" = "dave"; + }; + "torrent" = { + "path" = "/home/dave/volumes/captain--torrent-downloads/_data"; + "read only" = "no"; + "browsable" = "yes"; + "guest ok" = "no"; + "writable" = "yes"; + "valid users" = "dave"; + }; + }; + }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -127,6 +180,7 @@ lazygit tmux nixfmt-rfc-style + btop ]; # Some programs need SUID wrappers, can be configured further or are @@ -144,6 +198,8 @@ # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; + networking.firewall.enable = true; + networking.firewall.allowPing = true; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions