summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs/share')
-rw-r--r--makefu/2configs/share/anon-ftp.nix31
-rw-r--r--makefu/2configs/share/anon-sftp.nix25
-rw-r--r--makefu/2configs/share/default.nix29
-rw-r--r--makefu/2configs/share/gum-client.nix24
-rw-r--r--makefu/2configs/share/gum.nix41
-rw-r--r--makefu/2configs/share/hetzner-client.nix31
-rw-r--r--makefu/2configs/share/omo-client.nix28
-rw-r--r--makefu/2configs/share/omo-timemachine.nix19
-rw-r--r--makefu/2configs/share/omo.nix104
-rw-r--r--makefu/2configs/share/temp-share-samba.nix45
-rw-r--r--makefu/2configs/share/wbob.nix47
11 files changed, 0 insertions, 424 deletions
diff --git a/makefu/2configs/share/anon-ftp.nix b/makefu/2configs/share/anon-ftp.nix
deleted file mode 100644
index d2a535f9..00000000
--- a/makefu/2configs/share/anon-ftp.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, lib, ... }:
-let
- ftpdir = "/data";
-in {
- networking.firewall = {
- allowedTCPPorts = [ 20 21 ];
- autoLoadConntrackHelpers = true;
- connectionTrackingModules = [ "ftp" ];
- extraCommands = ''
- iptables -A PREROUTING -t raw -p tcp --dport 21 -j CT --helper ftp
- '';
- };
- systemd.services.vsftpd.preStart = lib.mkForce ''
- mkdir -p -m755 ${ftpdir}/incoming
- chown root:root ${ftpdir}
- chown ftp ${ftpdir}/incoming
- '';
- services.vsftpd = {
- enable = true;
- extraConfig = ''
- ftpd_banner=Welcome to the krebs share, use the incoming dir for new and old leaks. Join freenode#krebs
- '';
- anonymousUser = true;
- anonymousUserNoPassword = true;
- anonymousUploadEnable = true;
- anonymousMkdirEnable = true;
- writeEnable = true;
- chrootlocalUser = true;
- anonymousUserHome = ftpdir;
- };
-}
diff --git a/makefu/2configs/share/anon-sftp.nix b/makefu/2configs/share/anon-sftp.nix
deleted file mode 100644
index 7cde9317..00000000
--- a/makefu/2configs/share/anon-sftp.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-{
- services.openssh = {
- allowSFTP = true;
- sftpFlags = [ "-l VERBOSE" ];
- extraConfig = ''
- Match User anonymous
- ForceCommand internal-sftp
- AllowTcpForwarding no
- X11Forwarding no
- PasswordAuthentication no
- '';
- };
-
- users.users.anonymous = {
- uid = genid "anonymous";
- useDefaultShell = false;
- password = "anonymous";
- home = "/media/anon";
- createHome = true;
- };
-
-}
diff --git a/makefu/2configs/share/default.nix b/makefu/2configs/share/default.nix
deleted file mode 100644
index a1ad349b..00000000
--- a/makefu/2configs/share/default.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ config, lib, ... }:
-with import <stockholm/lib>;
-let
- base-dir = config.services.rtorrent.downloadDir;
-in {
- users.users = {
- download = {
- name = "download";
- home = base-dir;
- isNormalUser = true;
- uid = mkDefault (genid "download");
- createHome = false;
- useDefaultShell = true;
- group = "download";
- openssh.authorizedKeys.keys = [ ];
- };
- };
-
- users.groups = {
- download = {
- gid = lib.mkDefault (genid "download");
- members = [
- config.krebs.build.user.name
- "download"
- ];
- };
- };
-
-}
diff --git a/makefu/2configs/share/gum-client.nix b/makefu/2configs/share/gum-client.nix
deleted file mode 100644
index db2adfb1..00000000
--- a/makefu/2configs/share/gum-client.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- automount_opts =
- [ "x-systemd.automount"
- "noauto" "x-systemd.idle-timeout=600"
- "x-systemd.device-timeout=5s"
- "x-systemd.mount-timeout=5s"
- ];
- host = "nextgum"; #TODO
-in {
- fileSystems."/media/download" = {
- device = "//${host}/download";
- fsType = "cifs";
- options = automount_opts ++
- [ "credentials=/var/src/secrets/download.smb"
- "file_mode=0775"
- "dir_mode=0775"
- "uid=9001"
- "vers=3"
- ];
- };
-
-}
diff --git a/makefu/2configs/share/gum.nix b/makefu/2configs/share/gum.nix
deleted file mode 100644
index fd81f28c..00000000
--- a/makefu/2configs/share/gum.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-let
- hostname = config.krebs.build.host.name;
-in {
- # users.users.smbguest = {
- # name = "smbguest";
- # uid = config.ids.uids.smbguest;
- # description = "smb guest user";
- # home = "/var/empty";
- # };
- environment.systemPackages = [ pkgs.samba ];
- users.users.download = {
- uid = genid "download";
- isNormalUser = true;
- };
- services.samba = {
- enable = true;
- shares = {
- download = {
- path = "/var/download";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "no";
- "valid users" = "download";
- };
- };
- extraConfig = ''
- # guest account = smbguest
- # map to guest = bad user
- # disable printing
- load printers = no
- printing = bsd
- printcap name = /dev/null
- disable spoolss = yes
- '';
- };
- networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 445 ];
- networking.firewall.interfaces.wiregrill.allowedTCPPorts = [ 445 ];
-}
diff --git a/makefu/2configs/share/hetzner-client.nix b/makefu/2configs/share/hetzner-client.nix
deleted file mode 100644
index 90bc32de..00000000
--- a/makefu/2configs/share/hetzner-client.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with <stockholm/lib>;
-let
- automount_opts =
- [ "x-systemd.automount"
- "noauto" "x-systemd.idle-timeout=600"
- "x-systemd.device-timeout=5s"
- "x-systemd.mount-timeout=5s"
- ];
- host = "u288834.your-storagebox.de";
-in {
- boot.kernel.sysctl."net.ipv6.route.max_size" = 2147483647;
-
- fileSystems."/media/cloud" = {
- device = "//${host}/backup";
- fsType = "cifs";
- options = automount_opts ++
- [ "credentials=${toString <secrets/hetzner.smb>}"
- "file_mode=0770"
- "dir_mode=0770"
- "uid=${toString config.users.users.download.uid}"
- "gid=${toString config.users.groups.download.gid}"
- #"vers=3"
- "vers=2.1"
- "rsize=65536"
- "wsize=130048"
- "iocharset=utf8"
- ];
- };
-}
diff --git a/makefu/2configs/share/omo-client.nix b/makefu/2configs/share/omo-client.nix
deleted file mode 100644
index 4ad32bdd..00000000
--- a/makefu/2configs/share/omo-client.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- automount_opts =
- [ "x-systemd.automount"
- "noauto" "x-systemd.idle-timeout=600"
- "x-systemd.device-timeout=5s"
- "x-systemd.mount-timeout=5s"
- ];
- host = "omo.lan"; #TODO
- path = "/media/omo/photos";
-in {
- systemd.tmpfiles.rules = [
- "d ${path} root root - -"
- ];
- fileSystems."${path}" = {
- device = "//${host}/photos";
- fsType = "cifs";
- options = automount_opts ++
- [ "credentials=/var/src/secrets/omo-client.smb"
- "file_mode=0775"
- "dir_mode=0775"
- "uid=9001"
- "vers=3"
- ];
- };
-
-}
diff --git a/makefu/2configs/share/omo-timemachine.nix b/makefu/2configs/share/omo-timemachine.nix
deleted file mode 100644
index 18cf0328..00000000
--- a/makefu/2configs/share/omo-timemachine.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ pkgs, ... }:
-{
- services.samba = {
- # support for timemachine in git
- package = pkgs.sambaFull;
- shares = {
- time_machine = {
- path = "/media/crypt3/backup/time_machine";
- "valid users" = "misa";
- public = "no";
- writeable = "yes";
- "force user" = "misa";
- "fruit:aapl" = "yes";
- "fruit:time machine" = "yes";
- "vfs objects" = "catia fruit streams_xattr";
- };
- };
- };
-}
diff --git a/makefu/2configs/share/omo.nix b/makefu/2configs/share/omo.nix
deleted file mode 100644
index e53158b8..00000000
--- a/makefu/2configs/share/omo.nix
+++ /dev/null
@@ -1,104 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-let
- hostname = config.krebs.build.host.name;
- # TODO local-ip from the nets config
- internal-ip = "192.168.111.11";
- # local-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
-in {
-
- # samba share /media/crypt1/share
- users.users.smbguest = {
- name = "smbguest";
- uid = config.ids.uids.smbguest;
- description = "smb guest user";
- home = "/var/empty";
- group = "share";
- };
- users.groups.share = {};
- services.samba = {
- enable = true;
- shares = {
- winshare = {
- path = "/media/crypt1/share";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "yes";
- };
- emu = {
- path = "/media/crypt1/emu";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- movies = {
- path = "/media/cryptX/movies";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- audiobook = {
- path = "/media/crypt1/audiobooks";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- crypt0 = {
- path = "/media/crypt0";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- 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";
- };
- youtube = {
- path = "/media/cryptX/youtube";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- photos = {
- path = "/media/cryptX/photos";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- crypX-games = {
- path = "/media/cryptX/games";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- media-rw = {
- path = "/media/";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "no";
- "valid users" = "makefu";
- };
- };
- extraConfig = ''
- guest account = smbguest
- map to guest = bad user
- # disable printing
- load printers = no
- printing = bsd
- printcap name = /dev/null
- disable spoolss = yes
- workgroup = WORKGROUP
- server string = ${config.networking.hostName}
- netbios name = ${config.networking.hostName}
- '';
- };
-}
diff --git a/makefu/2configs/share/temp-share-samba.nix b/makefu/2configs/share/temp-share-samba.nix
deleted file mode 100644
index bcfddc11..00000000
--- a/makefu/2configs/share/temp-share-samba.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{config, ... }:{
- services.avahi = {
- enable = true;
- interfaces = [ config.makefu.server.primary-itf ];
- publish.enable = true;
- publish.userServices = true;
- };
- networking.firewall.allowedUDPPorts = [ 137 138 ];
- networking.firewall.allowedTCPPorts = [ 139 445 ];
- users.users.smbguest = {
- name = "smbguest";
- uid = config.ids.uids.smbguest; # effectively systemUser
- description = "smb guest user";
- home = "/home/share";
- createHome = true;
- group = "smbguest";
- };
- users.groups.smbguest = {};
- services.samba = {
- enable = true;
- shares = {
- share-home = {
- path = "/home/share/";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "yes";
- };
- movies = {
- path = "/home/makefu/movies";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- };
- extraConfig = ''
- guest account = smbguest
- map to guest = bad user
- # disable printing
- load printers = no
- printing = bsd
- printcap name = /dev/null
- disable spoolss = yes
- '';
- };
-}
diff --git a/makefu/2configs/share/wbob.nix b/makefu/2configs/share/wbob.nix
deleted file mode 100644
index 9e5f8ddf..00000000
--- a/makefu/2configs/share/wbob.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{config, ... }:{
- networking.firewall.allowedUDPPorts = [ 137 138 ];
- networking.firewall.allowedTCPPorts = [ 139 445 ];
- users.users.smbguest = {
- name = "smbguest";
- uid = config.ids.uids.smbguest; # effectively systemUser
- description = "smb guest user";
- home = "/home/share";
- createHome = true;
- group = "smbguest";
- };
- users.groups.smbguest = {};
- users.groups.mpd.members = [ "makefu" ];
- services.samba = {
- enable = true;
- enableNmbd = true;
- shares = {
- incoming = {
- path = "/data/incoming";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "yes";
- };
- data = {
- path = "/data/";
- "read only" = "yes";
- browseable = "yes";
- "guest ok" = "yes";
- };
- music-rw = {
- path = "/data/music";
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "no";
- };
- };
- extraConfig = ''
- guest account = smbguest
- map to guest = bad user
- # disable printing
- load printers = no
- printing = bsd
- printcap name = /dev/null
- disable spoolss = yes
- '';
- };
-}