Vsftpd dans un conteneur
This commit is contained in:
parent
fa7ff33dd5
commit
01a7d09d27
4 changed files with 50 additions and 21 deletions
49
containers/vsftpd.nix
Normal file
49
containers/vsftpd.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ 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$Mu47EjsbNTewDkRp$XeQh6rcdvb3BUXzsGqekKImLTrMgnN0VyERoSbpI4rMPlx8oHM9NNeHZtfIiLEaZGtQ9otnbLa54jYse5Iwev1";
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue