diff --git a/flake.nix b/flake.nix index ff575fa..5b7a91d 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,12 @@ inherit inputs outputs; }; }; + orpheus = lib.nixosSystem { + modules = [./hosts/orpheus]; + specialArgs = { + inherit inputs outputs; + }; + }; }; homeConfigurations = { diff --git a/hosts/orpheus/default.nix b/hosts/orpheus/default.nix new file mode 100644 index 0000000..71fc0f8 --- /dev/null +++ b/hosts/orpheus/default.nix @@ -0,0 +1,31 @@ +{ + pkgs, + inputs, + ... +}: { + imports = [ + inputs.hardware.nixosModules.common-cpu-amd + inputs.hardware.nixosModules.common-gpu-amd + inputs.hardware.nixosModules.common-pc-ssd + + ./hardware-configuration.nix + ../common/global + ../common/users/dwessels + + ]; + + networking = { + hostName = "orpheus"; + useDHCP = true; + }; + + boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest; + + powerManagment.powertop.enable = true; + programs = { + adb.enable = true; + dconf.enable = true; + }; + + system.stateVersion = "22.11"; +} diff --git a/hosts/orpheus/hardware-configuration.nix b/hosts/orpheus/hardware-configuration.nix new file mode 100644 index 0000000..a8717a4 --- /dev/null +++ b/hosts/orpheus/hardware-configuration.nix @@ -0,0 +1,44 @@ +# 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 = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/cdcfbbfa-ae65-48ff-acfd-1ceba3376f2f"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7C92-2CC6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f8b826c3-629d-4e11-a902-d076d16be33b"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0f0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0f1np1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}