feat: make some settings better.
This commit is contained in:
parent
879ce06305
commit
bf659b8482
4 changed files with 11 additions and 18 deletions
|
|
@ -2,5 +2,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
aria2
|
aria2
|
||||||
unzip
|
unzip
|
||||||
|
lm_sensors
|
||||||
|
neovim
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,11 @@
|
||||||
./podman.nix
|
./podman.nix
|
||||||
./additional-pkgs.nix
|
./additional-pkgs.nix
|
||||||
./root.nix
|
./root.nix
|
||||||
./beszel-agent.nix
|
|
||||||
./optimise-storage.nix
|
./optimise-storage.nix
|
||||||
./restic.nix
|
./restic.nix
|
||||||
./nix-features.nix
|
./nix-features.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
|
./fail2ban.nix
|
||||||
|
./beszel-agent.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{...}: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -25,19 +29,4 @@
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
maxretry = 5;
|
|
||||||
ignoreIP = [
|
|
||||||
"65.21.241.194"
|
|
||||||
];
|
|
||||||
bantime = "24h"; # Ban IPs for one day on the first ban
|
|
||||||
bantime-increment = {
|
|
||||||
enable = true; # Enable increment of bantime after each violation
|
|
||||||
multipliers = "1 2 4 8 16 32 64";
|
|
||||||
maxtime = "168h"; # Do not ban for more than 1 week
|
|
||||||
overalljails = true; # Calculate the bantime based on all the violations
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
users.users.crony = {
|
users.users.crony = {
|
||||||
hashedPasswordFile = "${config.age.secrets.crony-passwd.path}";
|
linger = true;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "crony";
|
description = "crony";
|
||||||
|
hashedPasswordFile = "${config.age.secrets.crony-passwd.path}";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue