diff --git a/modules/hardware-configuration.nix b/modules/hardware-configuration.nix new file mode 100644 index 0000000..efadb8f --- /dev/null +++ b/modules/hardware-configuration.nix @@ -0,0 +1,24 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +} diff --git a/modules/networking.nix b/modules/networking.nix new file mode 100644 index 0000000..7d855ab --- /dev/null +++ b/modules/networking.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +{ + # Assign a static IP + networking = { + hostName = "aegis"; + hostId = "78bb604d"; + interfaces.eth0 = { + useDHCP = false; + ipv4.addresses = [{ + address = "10.0.1.4"; + prefixLength = 24; + }]; + }; + defaultGateway = { + address = "10.0.1.1"; + interface = "eth0"; + }; + nameservers = [ "1.1.1.1" "8.8.8.8" ]; + enableIPv6 = false; + }; + + # Enable zeroconf + services.avahi = { + enable = true; + nssmdns = true; + publish = { + enable = true; + addresses = true; + domain = true; + }; + }; + + # Firewall configuration + networking.firewall = { + allowedTCPPorts = [ ]; + allowedUDPPorts = [ ]; + }; + +}