samba initial setup

This commit is contained in:
Noah Masur 2023-02-28 05:05:04 +00:00
parent 43343b2824
commit f648e92c28
4 changed files with 25 additions and 0 deletions

View File

@ -40,6 +40,7 @@ nixpkgs.lib.nixosSystem {
neovim.enable = true;
caddy.enable = true;
streamServer = "stream.masu.rs";
samba.enable = true;
backup.s3 = {
endpoint = "s3.us-west-002.backblazeb2.com";

View File

@ -17,6 +17,9 @@
gnome.sushi # Quick preview with spacebar
];
# Allow browsing Samba shares
services.gvfs.enable = true;
# Set default for opening directories
xdg.mimeApps.defaultApplications."inode/directory" =
[ "nautilus.desktop" ];

View File

@ -15,6 +15,7 @@
./netdata.nix
./nextcloud.nix
./prometheus.nix
./samba.nix
./secrets.nix
./sshd.nix
./transmission.nix

View File

@ -0,0 +1,20 @@
{ config, lib, ... }: {
options = { samba.enable = lib.mkEnableOption "Enable Samba sharing."; };
config = lib.mkIf (config.samba.enable) {
services.samba.enable = true;
services.samba.shares.video = {
path = "/data/video";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"force user" = config.user;
"force group" = config.user;
comment = "Movies and TV";
};
};
}