add bluetooth and nvidia modules + hw config
This commit is contained in:
parent
911685f9ee
commit
4e3838b97f
5 changed files with 77 additions and 20 deletions
|
|
@ -7,6 +7,7 @@ let
|
||||||
mods = with self.nixosModules; [
|
mods = with self.nixosModules; [
|
||||||
agenix
|
agenix
|
||||||
base_services
|
base_services
|
||||||
|
bluetooth
|
||||||
boot
|
boot
|
||||||
core
|
core
|
||||||
chromium
|
chromium
|
||||||
|
|
@ -28,16 +29,7 @@ in
|
||||||
modules =
|
modules =
|
||||||
with self.nixosModules;
|
with self.nixosModules;
|
||||||
[
|
[
|
||||||
{
|
nvidia
|
||||||
config.networking.hostName = "nerv";
|
|
||||||
config.dualBoot = true;
|
|
||||||
config.hardware.nvidia = {
|
|
||||||
open = true;
|
|
||||||
modesetting.enable = true;
|
|
||||||
};
|
|
||||||
config.services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
++ mods;
|
++ mods;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
15
modules/hardware/bluetooth.nix
Normal file
15
modules/hardware/bluetooth.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
flake.nixosModules.bluetooth = {
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = false;
|
||||||
|
input.General.ClassicBondedOnly = false;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/hardware/nvidia.nix
Normal file
18
modules/hardware/nvidia.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }: {
|
||||||
|
flake.nixosModules.nvidia = { config, ... }: {
|
||||||
|
# Enable OpenGL
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
modules/hosts/nerv/hardware-configuration.nix
Normal file
42
modules/hosts/nerv/hardware-configuration.nix
Normal file
|
|
@ -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.
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake.nixosModules.nerv = {
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DC66-ACA6";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,6 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
flake.nixosModules.core = { pkgs, ... }: {
|
flake.nixosModules.core = { pkgs, ... }: {
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = false;
|
|
||||||
input.General.ClassicBondedOnly = false;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
Experimental = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue