From 80b2a5ed2cf30c66ec75480c24c53c7b329c3381 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 2 May 2023 17:50:50 -0700 Subject: profiles/hardware: create a few profiles related to hardware --- profiles/default.nix | 2 ++ profiles/hardware/amd.nix | 6 ++++++ profiles/hardware/intel.nix | 5 +++++ profiles/hardware/xps9300.nix | 12 ++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 profiles/hardware/amd.nix create mode 100644 profiles/hardware/intel.nix create mode 100644 profiles/hardware/xps9300.nix (limited to 'profiles') diff --git a/profiles/default.nix b/profiles/default.nix index 7a2e6af..31e044a 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -8,6 +8,8 @@ security.sudo.wheelNeedsPassword = false; security.polkit.enable = true; + services.fstrim.enable = true; + programs.ssh = { # $ ssh-keyscan example.com knownHosts = { diff --git a/profiles/hardware/amd.nix b/profiles/hardware/amd.nix new file mode 100644 index 0000000..dc933ee --- /dev/null +++ b/profiles/hardware/amd.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + hardware.cpu.amd.updateMicrocode = true; + boot.kernelModules = [ "kvm-amd" "k10temp" ]; + boot.kernelParams = [ "amd_pstate=passive" ]; +} diff --git a/profiles/hardware/intel.nix b/profiles/hardware/intel.nix new file mode 100644 index 0000000..756ad9a --- /dev/null +++ b/profiles/hardware/intel.nix @@ -0,0 +1,5 @@ +{ ... }: +{ + hardware.cpu.intel.updateMicrocode = true; + boot.kernelModules = [ "kvm-intel" ]; +} diff --git a/profiles/hardware/xps9300.nix b/profiles/hardware/xps9300.nix new file mode 100644 index 0000000..3e58c88 --- /dev/null +++ b/profiles/hardware/xps9300.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + imports = [ + ./intel.nix + ]; + + boot.kernelParams = [ "mem_sleep_default=deep" ]; + + networking.wireless.iwd.enable = true; + hardware.bluetooth.enable = true; + services.blueman.enable = true; +} -- cgit 1.4.1