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
+12 -11
View File
@@ -1,3 +1,4 @@
{ ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@@ -5,19 +6,19 @@
]; ];
networking = { networking = {
hostName = "cyper-proxy"; hostName = "cyper-proxy";
useNetworkd = true; useDHCP = false;
useDHCP = false; interfaces.ens3 = {
firewall.enable = true; 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";
} }
+29 -23
View File
@@ -1,37 +1,43 @@
{ 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 = {
"virtio_pci" enable = true;
"virtio_blk" device = "/dev/vda";
"virtio_net" };
"ahci"
"xhci_pci" initrd = {
]; availableKernelModules = [
initrd.kernelModules = [ ]; "ata_piix"
kernelModules = [ ]; "virtio_pci"
extraModulePackages = [ ]; "virtio_scsi"
loader.systemd-boot.enable = true; "virtio_blk"
loader.efi.canTouchEfiVariables = true; "xhci_pci"
}; "sr_mod"
];
kernelModules = [ ];
};
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4"; fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
}; };
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
swapDevices = [ ]; swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";