We transitioned from Rocky to NIX

This commit is contained in:
2026-04-25 02:20:35 +02:00
parent b944652549
commit fcb4de2176
2 changed files with 41 additions and 34 deletions
+10 -9
View File
@@ -1,3 +1,4 @@
{ ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@@ -6,18 +7,18 @@
networking = { networking = {
hostName = "cyper-proxy"; hostName = "cyper-proxy";
useNetworkd = true;
useDHCP = false; useDHCP = false;
firewall.enable = true; interfaces.ens3 = {
ipv4.addresses = [
{ address = "178.254.8.35"; prefixLength = 23; }
];
}; };
defaultGateway = "178.254.8.1";
nameservers = [ "178.254.16.151" "178.254.16.141" ];
systemd.network = { firewall.allowedTCPPorts = [ 80 443 ];
enable = true;
networks."10-eth" = { };
matchConfig.Name = "en* eth*"; # catches both naming schemes
networkConfig.DHCP = "yes";
};
};
system.stateVersion = "26.05"; system.stateVersion = "26.05";
} }
+14 -8
View File
@@ -1,23 +1,28 @@
{ lib, modulesPath, ... }: { lib, modulesPath, ... }:
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot = { boot = {
initrd.availableKernelModules = [ loader.grub = {
enable = true;
device = "/dev/vda";
};
initrd = {
availableKernelModules = [
"ata_piix"
"virtio_pci" "virtio_pci"
"virtio_scsi"
"virtio_blk" "virtio_blk"
"virtio_net"
"ahci"
"xhci_pci" "xhci_pci"
"sr_mod"
]; ];
initrd.kernelModules = [ ]; kernelModules = [ ];
};
kernelModules = [ ]; kernelModules = [ ];
extraModulePackages = [ ]; extraModulePackages = [ ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
}; };
fileSystems = { fileSystems = {
@@ -29,8 +34,9 @@
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
}; };
}; };
swapDevices = [ ]; swapDevices = [ ];