diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index d4f4ac02..0b8f04c4 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -6,6 +6,7 @@ imports = [ # Include the results of the hardware scan. ./ryu.nix + ./services ]; programs = { diff --git a/nixos/ryu/services/default.nix b/nixos/ryu/services/default.nix new file mode 100644 index 00000000..8f754e53 --- /dev/null +++ b/nixos/ryu/services/default.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [ + ./samba.nix + ]; + # services = { + # }; +} diff --git a/nixos/ryu/services/samba.nix b/nixos/ryu/services/samba.nix new file mode 100644 index 00000000..3455f7ff --- /dev/null +++ b/nixos/ryu/services/samba.nix @@ -0,0 +1,37 @@ +{...}: { + services = { + samba = { + enable = true; + securityType = "user"; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server string" = "smbnix"; + "netbios name" = "smbnix"; + "security" = "user"; + "hosts allow" = "192.168.11. 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + + public = { + "path" = "/media"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + # "force user" = "username"; + # "force group" = "groupname"; + }; + }; + }; + samba-wsdd = { + enable = true; + openFirewall = true; + }; + }; + networking.firewall.allowPing = true; +}