added for vps
This commit is contained in:
parent
15d0cb574b
commit
ffbf9e08f2
9 changed files with 314 additions and 21 deletions
57
hosts/server/configuration.nix
Normal file
57
hosts/server/configuration.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./disk-config.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = ["xen_blkfront" "virtio_blk"];
|
||||
|
||||
networking = {
|
||||
hostName = "alteur";
|
||||
useDHCP = false;
|
||||
interfaces.enX0.ipv4.addresses = [
|
||||
{
|
||||
address = "redacted";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
defaultGateway = "redacted";
|
||||
nameservers = ["8.8.8.8" "8.8.4.4"];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [8123];
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"redacted"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
git
|
||||
htop
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [8123 80 443];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue