forked from nyanloutre/nixos-config
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ config, pkgs, ... }:
|
|
{
|
|
containers.vsftpd = {
|
|
autoStart = true;
|
|
config =
|
|
{ config, pkgs, ... }:
|
|
{
|
|
nixpkgs.overlays = [
|
|
(import ../overlays/vsftpd.nix)
|
|
];
|
|
services.vsftpd = {
|
|
enable = true;
|
|
forceLocalLoginsSSL = true;
|
|
forceLocalDataSSL = true;
|
|
userlistDeny = false;
|
|
localUsers = true;
|
|
userlist = ["claire" "manu"];
|
|
rsaCertFile = "/var/vsftpd/vsftpd.pem";
|
|
extraConfig = ''
|
|
pasv_min_port=64000
|
|
pasv_max_port=65535
|
|
local_root=/mnt/medias
|
|
'';
|
|
};
|
|
|
|
users.extraUsers = {
|
|
claire = {
|
|
isNormalUser = true;
|
|
hashedPassword = "$6$DjEjaibh$cRoOEHH.CjUgXXwyVphgnOGMhD3AVjPtawQb9BxvNSmWNqfcxoNH.6HhdxYa7PM0y0yctYXjsAc.vnkIov/NA/";
|
|
description = "Claire TREHIOU";
|
|
};
|
|
|
|
manu = {
|
|
isNormalUser = true;
|
|
hashedPassword = "$6$YGNIdGEclo$JcUotBS6hqlpENjjUeYhDjtrwxu10oARF4Nq4tEo072Sumr3Rl/w3ZXSHI5/3RxfvUMmJ4ulUVctBLhwrqP.g0";
|
|
description = "Emmanuel ZENNER";
|
|
};
|
|
};
|
|
};
|
|
bindMounts = {
|
|
"/var/vsftpd/vsftpd.pem" = {
|
|
hostPath = "/var/vsftpd/vsftpd.pem";
|
|
};
|
|
"/mnt/medias" = {
|
|
hostPath = "/mnt/medias";
|
|
};
|
|
};
|
|
};
|
|
}
|