mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-10 15:40:21 +02:00
(feat): reformatted code for flakes usage
This commit is contained in:
parent
d29d6f0133
commit
c3956d6fa4
40 changed files with 130 additions and 76 deletions
|
@ -1,61 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
# TODO: add access to series and TV folders.
|
||||
let
|
||||
cfg = config.samba;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
samba = {
|
||||
dir = mkOption {
|
||||
type = types.str;
|
||||
default = "/srv/Multimedia";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = hyperserver
|
||||
netbios name = hyperserver
|
||||
security = user
|
||||
'';
|
||||
shares = {
|
||||
music = {
|
||||
path = "/srv/media/Music";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
ebooks = {
|
||||
path = "${cfg.dir}/Ebooks";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
movies = {
|
||||
path = "${cfg.dir}/Films";
|
||||
browseable = "yes";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"read only" = "no";
|
||||
};
|
||||
shows = {
|
||||
path = "${cfg.dir}/SeriesTV";
|
||||
"read only" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
browseable = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue