Files
nixos-conf/alien-hardware-configuration.nix

104 lines
2.9 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
networking.hostName = "alien";
networking.networkmanager = {
enable = true;
wifi.backend = "wpa_supplicant"; # remove the iwd line, this is the default
wifi.powersave = false;
};
networking.wireless.enable = false;
# nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.login.enableGnomeKeyring = true;
security.polkit.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModprobeConfig = ''
options mt7921e disable_aspm=Y
options cfg80211 ieee80211_regdom="CA"
'';
programs.nm-applet.enable = true;
hardware.wirelessRegulatoryDatabase = true;
# systemd.services.heat-room = {
# description = "Morning room heating";
# after = [ "graphical-session.target" ];
# environment = {
# WAYLAND_DISPLAY = "wayland-1";
# XDG_RUNTIME_DIR = "/run/user/1000";
# };
# serviceConfig = {
# Type = "oneshot";
# User = "jeremy";
# };
# script = ''
# ${pkgs.furmark}/bin/furmark --demo furmark-gl &
# sleep 1s
# ${pkgs.hyprland}/bin/hyprctl dispatch dpms off
# sleep 2h
# pkill furmark
# '';
# };
# systemd.timers.heat-room = {
# wantedBy = [ "timers.target" ];
# timerConfig = {
# OnCalendar = "*-*-* 4:00:00"; # Runs at 4:00:00 AM every day
# Persistent = true; # Run immediately if a scheduled time was missed
# WakeSystem = true; # Wakes the system from suspend/hibernate
# Unit = "heat-room.service";
# };
# };
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
rocmPackages.clr.icd # Enables OpenCL support for AMD
];
};
# This helps the drivers find the hardware
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home/jeremy" =
{ device = "/dev/disk/by-label/JEREMY";
fsType = "ext4";
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}