Manually configure hardware

Remove nixos-hardware from inputs
This commit is contained in:
2024-07-12 13:26:37 -07:00
parent 27b9a6c48b
commit 3a39d3f991
3 changed files with 50 additions and 33 deletions

17
flake.lock generated
View File

@@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"nixos-hardware": {
"locked": {
"lastModified": 1720737798,
"narHash": "sha256-G/OtEAts7ZUvW5lrGMXSb8HqRp2Jr9I7reBuvCOL54w=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "c5013aa7ce2c7ec90acee5d965d950c8348db751",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1720386169, "lastModified": 1720386169,
@@ -34,7 +18,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@@ -1,12 +1,11 @@
{ {
description = "Nettika NixOS Configurations"; description = "Nettika's NixOS Configurations";
inputs = { inputs = {
nixos-hardware.url = "github:nixos/nixos-hardware/master";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
}; };
outputs = { nixpkgs, nixos-hardware, ... }@inputs: { outputs = { nixpkgs, ... }@inputs: {
nixosConfigurations = { nixosConfigurations = {
marauder = nixpkgs.lib.nixosSystem { marauder = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";

View File

@@ -1,14 +1,8 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
imports = [ imports = [ ./backup.nix ];
./backup.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g513im
];
networking = { networking.hostName = "marauder";
hostName = "marauder";
networkmanager.enable = true;
};
fileSystems = { fileSystems = {
"/" = { "/" = {
@@ -27,10 +21,39 @@
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ]; initrd = {
kernelModules = [ "kvm-amd" ]; systemd.enable = true;
availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
};
kernelModules = ["kvm-amd"];
kernelParams = [ "amd_pstate=active" ];
}; };
hardware = {
enableRedistributableFirmware = true;
cpu.amd.updateMicrocode = true;
opengl = {
enable = true;
driSupport32Bit = true;
extraPackages = [pkgs.vaapiVdpau];
};
nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
amdgpuBusId = "PCI:05:00:0";
nvidiaBusId = "PCI:01:00:0";
};
};
users.users = { users.users = {
nettika = { nettika = {
isNormalUser = true; isNormalUser = true;
@@ -93,13 +116,25 @@
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
services.xserver = { services.xserver = {
enable = true; enable = true;
desktopManager = { videoDrivers = ["nvidia"];
desktopManager = {
cinnamon.enable = true; cinnamon.enable = true;
xterm.enable = false; xterm.enable = false;
}; };
displayManager.defaultSession = "cinnamon"; };
services.displayManager = {
defaultSession = "cinnamon";
};
services.tlp = {
enable = true;
};
services.fstrim = {
enable = true;
}; };
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";