mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 02:52:55 +00:00
samba initial setup
This commit is contained in:
parent
43343b2824
commit
f648e92c28
@ -40,6 +40,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
caddy.enable = true;
|
caddy.enable = true;
|
||||||
streamServer = "stream.masu.rs";
|
streamServer = "stream.masu.rs";
|
||||||
|
samba.enable = true;
|
||||||
|
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
gnome.sushi # Quick preview with spacebar
|
gnome.sushi # Quick preview with spacebar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Allow browsing Samba shares
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
# Set default for opening directories
|
# Set default for opening directories
|
||||||
xdg.mimeApps.defaultApplications."inode/directory" =
|
xdg.mimeApps.defaultApplications."inode/directory" =
|
||||||
[ "nautilus.desktop" ];
|
[ "nautilus.desktop" ];
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
./netdata.nix
|
./netdata.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
|
./samba.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./sshd.nix
|
./sshd.nix
|
||||||
./transmission.nix
|
./transmission.nix
|
||||||
|
20
modules/nixos/services/samba.nix
Normal file
20
modules/nixos/services/samba.nix
Normal 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user