mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
update hetzner
This commit is contained in:
parent
1c442bfcaf
commit
23756b5276
2 changed files with 62 additions and 41 deletions
|
@ -50,6 +50,11 @@
|
||||||
url = "github:Lassulus/nether";
|
url = "github:Lassulus/nether";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
srvos = {
|
||||||
|
url = "github:nix-community/srvos";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
|
|
||||||
# Dependencys
|
# Dependencys
|
||||||
flake-parts = {
|
flake-parts = {
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, self, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
self.inputs.srvos.nixosModules.server
|
||||||
|
self.inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
|
self.inputs.srvos.nixosModules.mixins-nginx
|
||||||
|
];
|
||||||
|
|
||||||
jopejoe1 = {
|
jopejoe1 = {
|
||||||
local.enable = true;
|
local.enable = true;
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
|
@ -16,69 +23,78 @@
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot";
|
|
||||||
};
|
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
systemd.network.networks."10-uplink".networkConfig.Address = " 2a01:4f8:a0:31e5::/64";
|
||||||
useDHCP = false;
|
|
||||||
interfaces."enp41s0" = {
|
|
||||||
ipv4.addresses = [{ address = "85.10.200.204 "; prefixLength = 26; }];
|
|
||||||
ipv6.addresses = [{ address = "2a01:4f8:a0:31e5::"; prefixLength = 64; }];
|
|
||||||
};
|
|
||||||
defaultGateway = "85.10.200.193";
|
|
||||||
defaultGateway6 = { address = "fe80::1"; interface = "enp41s0"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
|
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
|
||||||
|
|
||||||
services.openssh.ports = [ 2222 22 ];
|
services.openssh.ports = [ 22 ];
|
||||||
|
|
||||||
console = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
vdb = {
|
vdb = {
|
||||||
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55622";
|
|
||||||
type = "disk";
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
content = {
|
content = {
|
||||||
type = "table";
|
type = "gpt";
|
||||||
format = "gpt";
|
partitions = {
|
||||||
partitions = [
|
boot = {
|
||||||
{
|
size = "1M";
|
||||||
name = "ESP";
|
type = "EF02"; # for grub MBR
|
||||||
start = "1M";
|
|
||||||
end = "500M";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
};
|
};
|
||||||
}
|
mdadm = {
|
||||||
{
|
size = "100%";
|
||||||
name = "root";
|
content = {
|
||||||
start = "500M";
|
type = "mdraid";
|
||||||
end = "100%";
|
name = "raid0";
|
||||||
part-type = "primary";
|
};
|
||||||
bootable = true;
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
vdc = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme1n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
mdadm = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "mdraid";
|
||||||
|
name = "raid0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mdadm = {
|
||||||
|
raid0 = {
|
||||||
|
type = "mdadm";
|
||||||
|
level = 0;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
];
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue