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"; system.stateVersion = "26.05";
} }
+6 -5
View File
@@ -6,15 +6,16 @@
}: }:
{ {
imports = [ imports = [
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"ahci" "ahci"
"xhci_pci" "xhci_pci"
"virtio_pci" "nvme"
"sr_mod" "usb_storage"
"virtio_blk" "usbhid"
"sd_mod"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
@@ -22,7 +23,7 @@
# hdd # hdd
fileSystems."/mnt/data" = { fileSystems."/mnt/data" = {
device = "/dev/disk/by-label/data"; device = "/dev/disk/by-id/ata-WDC_WD20EFPX-68C4TN0_WD-WX32DA423Z41";
fsType = "ext4"; fsType = "ext4";
options = [ options = [
"noatime" "noatime"
+21 -18
View File
@@ -2,25 +2,28 @@
{ {
networking = { networking = {
hostName = "homelab"; hostName = "homelab";
networkmanager.enable = true;
useDHCP = false; useDHCP = false;
defaultGateway = "192.168.88.1"; networkmanager.enable = false;
nameservers = [ };
"192.168.88.1"
]; systemd.network = {
interfaces.enp1s0 = { enable = true;
ipv4.addresses = [ networks."10-homelab-static-ip" = {
{ networkConfig = {
address = "192.168.88.5"; Address = "192.168.88.5/24";
prefixLength = 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 = [ ];
}; };
} }