diff --git a/hosts/yuzu/default.nix b/hosts/yuzu/default.nix new file mode 100644 index 0000000..339b42d --- /dev/null +++ b/hosts/yuzu/default.nix @@ -0,0 +1,22 @@ +{...}: { + imports = [ + ../../system + ./hardware-configuration.nix + ./power.nix + ]; + + networking.hostName = "yuzu"; + time.timeZone = "America/Chicago"; + services.xserver = { + videoDrivers = ["modesetting"]; + deviceSection = '' + Option "DRI" "2" + Option "TearFree" "true" + ''; + xkb.options = "ctrl:nocaps"; + }; + users.users.ahnwuoa = { + isNormalUser = true; + extraGroups = ["wheel" "podman"]; + }; +} diff --git a/hosts/yuzu/hardware-configuration.nix b/hosts/yuzu/hardware-configuration.nix new file mode 100644 index 0000000..9b199b8 --- /dev/null +++ b/hosts/yuzu/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "thunderbolt" "nvme"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/d0b134d2-789d-43da-8a1e-b74febb62012"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/467F-5E97"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + + swapDevices = []; + + # 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.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/yuzu/power.nix b/hosts/yuzu/power.nix new file mode 100644 index 0000000..47436d5 --- /dev/null +++ b/hosts/yuzu/power.nix @@ -0,0 +1,20 @@ +{...}: { + powerManagement = { + enable = true; + cpuFreqGovernor = "powersave"; + powertop.enable = true; + }; + services.auto-cpufreq.enable = true; + services.auto-cpufreq.settings = { + battery = { + governor = "powersave"; + turbo = "never"; + }; + charger = { + governor = "powersave"; + turbo = "auto"; + }; + }; + services.thermald.enable = true; + services.power-profiles-daemon.enable = false; +} diff --git a/hosts/yuzu/users/ahnwuoa/default.nix b/hosts/yuzu/users/ahnwuoa/default.nix new file mode 100644 index 0000000..b461b1b --- /dev/null +++ b/hosts/yuzu/users/ahnwuoa/default.nix @@ -0,0 +1,7 @@ +{config, ...}: { + imports = [ + ../../../../user + ]; + + home.username = "ahnwuoa"; +}