Fix disks id and netowork config

This commit is contained in:
aloslider
2026-04-12 17:50:35 +03:00
parent 6a3ff12527
commit 6ea769417b
3 changed files with 28 additions and 24 deletions
+1 -1
View File
@@ -24,6 +24,6 @@
))
];
disko.cfg.mainDevice = "/dev/vda";
disko.cfg.mainDevice = "/dev/disk/by-id/ata-AMD_R5M120G8_07092225C0040";
system.stateVersion = "26.05";
}
+6 -5
View File
@@ -6,15 +6,16 @@
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
@@ -22,7 +23,7 @@
# hdd
fileSystems."/mnt/data" = {
device = "/dev/disk/by-label/data";
device = "/dev/disk/by-id/ata-WDC_WD20EFPX-68C4TN0_WD-WX32DA423Z41";
fsType = "ext4";
options = [
"noatime"
+21 -18
View File
@@ -2,25 +2,28 @@
{
networking = {
hostName = "homelab";
networkmanager.enable = true;
useDHCP = false;
defaultGateway = "192.168.88.1";
nameservers = [
"192.168.88.1"
];
interfaces.enp1s0 = {
ipv4.addresses = [
{
address = "192.168.88.5";
prefixLength = 24;
}
];
networkmanager.enable = false;
};
systemd.network = {
enable = true;
networks."10-homelab-static-ip" = {
networkConfig = {
Address = "192.168.88.5/24";
Gateway = "192.168.88.1";
DNS = [ "192.168.88.1" ];
};
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "routable";
firewall = {
allowedTCPPorts = [
22
80
443
];
allowedUDPPorts = [ ];
};
};
firewall.allowedTCPPorts = [
22
80
443
];
firewall.allowedUDPPorts = [ ];
};
}