Add base eirene config
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
59
hosts/eirene/base/default.nix
Normal file
59
hosts/eirene/base/default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{ config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
(import ../format.nix { device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL22T0HBLB-00BL2_S64RNE0R602762"; })
|
||||
./hardware-configuration.nix
|
||||
../.
|
||||
];
|
||||
|
||||
networking.hostName = "eirene";
|
||||
|
||||
# https://github.com/NixOS/nixos-hardware/tree/master/lenovo/legion/16achg6
|
||||
|
||||
hardware = {
|
||||
cpu.amd = {
|
||||
updateMicrocode = true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
open = false;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
amdgpuBusId = "PCI:6:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver.videoDrivers = [ "nvidia" ];
|
||||
tlp.enable = true;
|
||||
fstrim.enable = true;
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelParams = [ "amd_pstate=active" "video=eDP:2560x1600@165" ];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [{ wayland.windowManager.hyprland.settings.monitor = "eDP, 2560x1600@165, 0x0, 1"; }];
|
||||
}
|
14
hosts/eirene/base/hardware-configuration.nix
Normal file
14
hosts/eirene/base/hardware-configuration.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "nvme" "ahci" "usbhid" ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Reference in New Issue
Block a user