2016-01-16 01:30:37 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2016-10-20 20:54:38 +02:00
|
|
|
with import <stockholm/lib>;
|
2016-01-16 01:30:37 +01:00
|
|
|
let
|
|
|
|
hostname = config.krebs.build.host.name;
|
|
|
|
# TODO local-ip from the nets config
|
2021-04-08 21:39:39 +02:00
|
|
|
internal-ip = "192.168.111.11";
|
2016-04-08 03:53:34 +02:00
|
|
|
# local-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
|
2016-01-16 01:30:37 +01:00
|
|
|
in {
|
2016-02-01 22:01:41 +01:00
|
|
|
|
|
|
|
# samba share /media/crypt1/share
|
|
|
|
users.users.smbguest = {
|
|
|
|
name = "smbguest";
|
|
|
|
uid = config.ids.uids.smbguest;
|
|
|
|
description = "smb guest user";
|
|
|
|
home = "/var/empty";
|
2021-12-04 23:02:52 +01:00
|
|
|
group = "share";
|
2016-02-01 22:01:41 +01:00
|
|
|
};
|
2021-12-04 23:02:52 +01:00
|
|
|
users.groups.share = {};
|
2016-02-01 22:01:41 +01:00
|
|
|
services.samba = {
|
|
|
|
enable = true;
|
|
|
|
shares = {
|
|
|
|
winshare = {
|
|
|
|
path = "/media/crypt1/share";
|
|
|
|
"read only" = "no";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2016-04-03 21:39:28 +02:00
|
|
|
emu = {
|
|
|
|
path = "/media/crypt1/emu";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2022-03-01 23:26:31 +01:00
|
|
|
movies = {
|
|
|
|
path = "/media/cryptX/movies";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2018-12-13 01:50:23 +01:00
|
|
|
audiobook = {
|
|
|
|
path = "/media/crypt1/audiobooks";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2017-12-08 14:27:54 +01:00
|
|
|
crypt0 = {
|
|
|
|
path = "/media/crypt0";
|
2016-12-24 23:43:25 +01:00
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2020-04-21 21:41:21 +02:00
|
|
|
anime = {
|
|
|
|
path = "/media/cryptX/anime";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
|
|
|
serien = {
|
|
|
|
path = "/media/cryptX/series";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2020-07-02 08:36:19 +02:00
|
|
|
youtube = {
|
|
|
|
path = "/media/cryptX/youtube";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2021-01-27 23:05:45 +01:00
|
|
|
photos = {
|
|
|
|
path = "/media/cryptX/photos";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2017-12-08 14:27:54 +01:00
|
|
|
crypX-games = {
|
|
|
|
path = "/media/cryptX/games";
|
2017-01-09 16:00:57 +01:00
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
2017-03-01 15:46:43 +01:00
|
|
|
media-rw = {
|
|
|
|
path = "/media/";
|
2016-05-02 17:37:48 +02:00
|
|
|
"read only" = "no";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "no";
|
|
|
|
"valid users" = "makefu";
|
|
|
|
};
|
2022-09-23 23:01:58 +02:00
|
|
|
#cloud = {
|
|
|
|
# path = "/media/cloud/download/finished";
|
|
|
|
# "read only" = "no";
|
|
|
|
# browseable = "yes";
|
|
|
|
# "guest ok" = "yes";
|
|
|
|
#};
|
2016-02-01 22:01:41 +01:00
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
guest account = smbguest
|
|
|
|
map to guest = bad user
|
|
|
|
# disable printing
|
|
|
|
load printers = no
|
|
|
|
printing = bsd
|
|
|
|
printcap name = /dev/null
|
|
|
|
disable spoolss = yes
|
2020-11-16 21:33:58 +01:00
|
|
|
workgroup = WORKGROUP
|
|
|
|
server string = ${config.networking.hostName}
|
|
|
|
netbios name = ${config.networking.hostName}
|
2016-02-01 22:01:41 +01:00
|
|
|
'';
|
|
|
|
};
|
2016-01-16 01:30:37 +01:00
|
|
|
}
|