forked from nyanloutre/nixos-config
Vsftpd dans un conteneur
This commit is contained in:
parent
fa7ff33dd5
commit
01a7d09d27
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -40,7 +40,6 @@
|
||||
(import ../../overlays/neovim.nix)
|
||||
(import ../../overlays/site-max.nix)
|
||||
(import ../../overlays/site-musique.nix)
|
||||
(import ../../overlays/vsftpd.nix)
|
||||
(import ../../overlays/dogetipbot-telegram.nix)
|
||||
(import ../../overlays/unstable_pkgs.nix)
|
||||
];
|
||||
|
@ -19,6 +19,7 @@ in
|
||||
../../services/mail-server.nix
|
||||
../../services/site-musique.nix
|
||||
../../services/site-max.nix
|
||||
../../containers/vsftpd.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
@ -342,20 +343,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
vsftpd = {
|
||||
enable = true;
|
||||
forceLocalLoginsSSL = true;
|
||||
forceLocalDataSSL = true;
|
||||
userlistDeny = false;
|
||||
localUsers = true;
|
||||
userlist = ["claire"];
|
||||
rsaCertFile = "/var/vsftpd/vsftpd.pem";
|
||||
extraConfig = ''
|
||||
pasv_min_port=64000
|
||||
pasv_max_port=65535
|
||||
'';
|
||||
};
|
||||
|
||||
site-musique = {
|
||||
enable = true;
|
||||
port = musique_port;
|
||||
|
@ -21,12 +21,6 @@
|
||||
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCaCc2qcQsd/VPDX1K97zJ/MjObWnTfRkA98xeNnVTeGoMmbf/fW1KszB+3IYCngCKLhliotHEXkqOK24vMLZ9ylVPTIPLNY5OWLFRQSOU/OykP8r4ikDWmMOwI+tqkoBknTUZdA1MN1JmkpE1cWL8vRJ7mnwl/p7xCMHV19N5+UdoIx3bFsm0CCUMIYSaIefoD3tpIzmgVqBkIH4FSmNwvXHwcXhhOTGqXbTJYC/GY2mI0AFvZI3T61ReV325ms7QRQlElXP8Rv8lpjr57VISNjKsPPNvifLjy10RjIS8iNioN6fJ0XBCfKOmm37VX86aFkAgWdpzxGojprOXnViwZEWSegnvKGx8FNx3gB54zF76e6koWS+qnYf9UTdogO6uXhXZb7AoMC9XD0/l6Egh8HzPWAUZtLx74zhB8ufoKmzqOp4YrCK8Cu4N/1UTFyPUoeSCZJdcE/9iqldym06mOi4rDV5cKCzs+Q0bVP8+x8SZ9ajYUH7l4sxjDHtHiyAYniWIxGPO5NazCfx7J+1GGzbtV0HuBwE/U20z+nBy+WZ4MowQTNb2E2uhq4OgQASx7uTKtyhnfT09A3toHZVerfH8ET8YEVnwdYMCA0GHYMOZ48h1ORdE+OLyqRlxjYTCB17Kc2icSL3iv8Yd66vQagy3A+C8OhZP1rdc15bEZnw== openpgp:0x28DF0235" ];
|
||||
};
|
||||
|
||||
claire = {
|
||||
isNormalUser = true;
|
||||
hashedPassword = "$6$Mu47EjsbNTewDkRp$XeQh6rcdvb3BUXzsGqekKImLTrMgnN0VyERoSbpI4rMPlx8oHM9NNeHZtfIiLEaZGtQ9otnbLa54jYse5Iwev1";
|
||||
description = "Claire TREHIOU";
|
||||
};
|
||||
|
||||
synology = {
|
||||
uid = 1001;
|
||||
isNormalUser = true;
|
||||
|
Loading…
Reference in New Issue
Block a user