mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
This commit completely restructures the flake. Hosts are now seperate from profile configuration files in hosts/[system]. Nixos and Darwin configurations will be built when present in the respective folders in hosts/
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
services = {
|
|
# add a user with sudo smbpasswd -a <user>
|
|
samba = {
|
|
package = pkgs.samba4Full;
|
|
# extraConfig = ''
|
|
# workgroup = WORKGROUP
|
|
# server role = standalone server
|
|
# dns proxy = no
|
|
|
|
# pam password change = yes
|
|
# map to guest = bad user
|
|
# create mask = 0664
|
|
# force create mode = 0664
|
|
# directory mask = 0775
|
|
# force directory mode = 0775
|
|
# follow symlinks = yes
|
|
# '';
|
|
|
|
enable = true;
|
|
openFirewall = true;
|
|
settings.Eternor = {
|
|
browseable = "yes";
|
|
"read only" = "no";
|
|
"guest ok" = "no";
|
|
path = "/Vault/Eternor";
|
|
writable = "true";
|
|
comment = "Eternor";
|
|
"valid users" = "Swarsel";
|
|
};
|
|
};
|
|
|
|
|
|
avahi = {
|
|
publish.enable = true;
|
|
publish.userServices = true; # Needed to allow samba to automatically register mDNS records without the need for an `extraServiceFile`
|
|
nssmdns4 = true;
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
# This enables autodiscovery on windows since SMB1 (and thus netbios) support was discontinued
|
|
samba-wsdd = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|