diff --git a/hosts/cyper-proxy/configuration.nix b/hosts/cyper-proxy/configuration.nix index 302e85b..1ce5bfa 100644 --- a/hosts/cyper-proxy/configuration.nix +++ b/hosts/cyper-proxy/configuration.nix @@ -1,3 +1,4 @@ +{ ... }: { imports = [ ./hardware-configuration.nix @@ -5,19 +6,19 @@ ]; networking = { - hostName = "cyper-proxy"; - useNetworkd = true; - useDHCP = false; - firewall.enable = true; + hostName = "cyper-proxy"; + useDHCP = false; + 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 = { - enable = true; - networks."10-eth" = { - matchConfig.Name = "en* eth*"; # catches both naming schemes - networkConfig.DHCP = "yes"; - }; - }; + firewall.allowedTCPPorts = [ 80 443 ]; + +}; system.stateVersion = "26.05"; } diff --git a/hosts/cyper-proxy/hardware-configuration.nix b/hosts/cyper-proxy/hardware-configuration.nix index c86f68b..29e3382 100644 --- a/hosts/cyper-proxy/hardware-configuration.nix +++ b/hosts/cyper-proxy/hardware-configuration.nix @@ -1,37 +1,43 @@ { lib, modulesPath, ... }: { imports = [ - (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") ]; boot = { - initrd.availableKernelModules = [ - "virtio_pci" - "virtio_blk" - "virtio_net" - "ahci" - "xhci_pci" - ]; - initrd.kernelModules = [ ]; - kernelModules = [ ]; - extraModulePackages = [ ]; - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; - }; + loader.grub = { + enable = true; + device = "/dev/vda"; + }; + + initrd = { + availableKernelModules = [ + "ata_piix" + "virtio_pci" + "virtio_scsi" + "virtio_blk" + "xhci_pci" + "sr_mod" + ]; + kernelModules = [ ]; + }; + kernelModules = [ ]; + extraModulePackages = [ ]; + }; fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIXROOT"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-label/NIXBOOT"; - fsType = "vfat"; - }; + "/" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; }; + "/boot" = { + device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; +}; + swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";