mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-07 20:47:14 +03:00
br v2
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./settings.nix
|
||||
./ssh.nix
|
||||
./systemd-routines.nix
|
||||
./shell.nix
|
||||
];
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services = {
|
||||
tailscale.enable = xlib.device.type != "wsl"; # true, if not wsl
|
||||
};
|
||||
services.tailscale.enable = xlib.device.type != "wsl"; # true, if not wsl
|
||||
|
||||
# All real hosts (not the bare "minimal" test config) get OOM protection
|
||||
# and a bounded journal.
|
||||
services.earlyoom.enable = lib.mkIf (xlib.device.type != "minimal") true;
|
||||
services.journald.extraConfig = lib.mkIf (xlib.device.type != "minimal") ''
|
||||
SystemMaxUse=512M
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.xlib.ssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
allowSFTP = true;
|
||||
openFirewall = lib.mkDefault false;
|
||||
hostKeys = [
|
||||
{
|
||||
path = "/etc/ssh/id_ed25519";
|
||||
type = "ed25519";
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "yes";
|
||||
UsePAM = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user