mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2025-12-11 22:30:11 -05:00
Moving Hardware Configuration To a Separate File
This commit is contained in:
parent
49f92c3d1f
commit
2726e125f8
2 changed files with 31 additions and 27 deletions
|
|
@ -12,6 +12,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||||
lix-module.nixosModules.default
|
lix-module.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
./hardware-configuration.nix
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
{
|
{
|
||||||
|
|
@ -21,35 +22,8 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "kim";
|
networking.hostName = "kim";
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
# boot.loader.grub.device = "/dev/vda";
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ]; # TODO: I use wayland, do I need this?
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/ba4362a3-3a0b-4227-b460-a5a9302f5966";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/DB88-8E65";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
networking.useDHCP = nixpkgs.lib.mkDefault true;
|
networking.useDHCP = nixpkgs.lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
|
||||||
|
|
||||||
# TODO: identityFile = "/home/${globals.user}/.ssh/id_ed2519";
|
# TODO: identityFile = "/home/${globals.user}/.ssh/id_ed2519";
|
||||||
# TODO: passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
# TODO: passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
||||||
|
|
||||||
|
|
@ -113,6 +87,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||||
spotifyd.enable = true;
|
spotifyd.enable = true;
|
||||||
# Programming Stuff
|
# Programming Stuff
|
||||||
nixpkgs-fmt.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
|
python3.enable = true;
|
||||||
vscode.enable = true;
|
vscode.enable = true;
|
||||||
# Utilities
|
# Utilities
|
||||||
# git is not optional
|
# git is not optional
|
||||||
|
|
|
||||||
29
hosts/kim/hardware-configuration.nix
Normal file
29
hosts/kim/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
{
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
# boot.loader.grub.device = "/dev/vda";
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ]; # TODO: I use wayland, do I need this?
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/ba4362a3-3a0b-4227-b460-a5a9302f5966";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/DB88-8E65";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue