ma 1 omo: use sftp share
This commit is contained in:
parent
d444dbbd03
commit
526c1b689d
|
@ -27,9 +27,12 @@ in {
|
||||||
../2configs/exim-retiolum.nix
|
../2configs/exim-retiolum.nix
|
||||||
../2configs/smart-monitor.nix
|
../2configs/smart-monitor.nix
|
||||||
../2configs/mail-client.nix
|
../2configs/mail-client.nix
|
||||||
|
../2configs/share-user-sftp.nix
|
||||||
../3modules
|
../3modules
|
||||||
];
|
];
|
||||||
|
# services.openssh.allowSFTP = false;
|
||||||
krebs.build.host = config.krebs.hosts.omo;
|
krebs.build.host = config.krebs.hosts.omo;
|
||||||
|
|
||||||
|
|
||||||
# copy config from <secrets/sabnzbd.ini> to /var/lib/sabnzbd/
|
# copy config from <secrets/sabnzbd.ini> to /var/lib/sabnzbd/
|
||||||
services.sabnzbd.enable = true;
|
services.sabnzbd.enable = true;
|
||||||
|
@ -103,4 +106,5 @@ in {
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
zramSwap.numDevices = 2;
|
zramSwap.numDevices = 2;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
21
2configs/share-user-sftp.nix
Normal file
21
2configs/share-user-sftp.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users = {
|
||||||
|
share = {
|
||||||
|
uid = 9002;
|
||||||
|
home = "/var/empty";
|
||||||
|
openssh.authorizedKeys.keys = [ config.krebs.users.makefu.pubkey ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# we will use internal-sftp to make uncomplicated Chroot work
|
||||||
|
services.openssh.extraConfig = ''
|
||||||
|
Match User share
|
||||||
|
ChrootDirectory /media
|
||||||
|
ForceCommand internal-sftp
|
||||||
|
AllowTcpForwarding no
|
||||||
|
PermitTunnel no
|
||||||
|
X11Forwarding no
|
||||||
|
Match All
|
||||||
|
'';
|
||||||
|
}
|
|
@ -12,8 +12,6 @@
|
||||||
# short daily, long weekly, check on boot
|
# short daily, long weekly, check on boot
|
||||||
defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)";
|
defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)";
|
||||||
|
|
||||||
devices = lib.mkDefault [{
|
devices = lib.mkDefault [ ];
|
||||||
device = "/dev/sda";
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue