From 0a5249fd9a942cfa54c1e223756e7ac2d05de61c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Jan 2020 04:31:10 -0500 Subject: [PATCH] Add shiro hardware config --- hosts/kuro/hardware-configuration.nix | 2 +- hosts/shiro/default.nix | 4 --- hosts/shiro/hardware-configuration.nix | 42 ++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 hosts/shiro/hardware-configuration.nix diff --git a/hosts/kuro/hardware-configuration.nix b/hosts/kuro/hardware-configuration.nix index d36b5631..099cf9f3 100644 --- a/hosts/kuro/hardware-configuration.nix +++ b/hosts/kuro/hardware-configuration.nix @@ -9,7 +9,7 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - ### CPU + ## CPU nix.maxJobs = lib.mkDefault 8; powerManagement.cpuFreqGovernor = "performance"; diff --git a/hosts/shiro/default.nix b/hosts/shiro/default.nix index c30e5e64..ddb45aa8 100644 --- a/hosts/shiro/default.nix +++ b/hosts/shiro/default.nix @@ -5,10 +5,6 @@ imports = [ ../personal.nix # common settings ./hardware-configuration.nix - (let nixos-hardware = - builtins.fetchTarball - https://github.com/NixOS/nixos-hardware/archive/master.tar.gz; - in "${nixos-hardware}/dell/xps/13-9370") ## Dekstop environment ## Apps diff --git a/hosts/shiro/hardware-configuration.nix b/hosts/shiro/hardware-configuration.nix new file mode 100644 index 00000000..0a55648a --- /dev/null +++ b/hosts/shiro/hardware-configuration.nix @@ -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. +{ config, lib, pkgs, ... }: + +{ + imports = [ + (let nixos-hardware = + builtins.fetchTarball + https://github.com/NixOS/nixos-hardware/archive/master.tar.gz; + in "${nixos-hardware}/dell/xps/13-9370") + + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + ## CPU + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + + ## SSDs + services.fstrim.enable = true; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/nixos"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/BOOT"; + fsType = "vfat"; + }; + "/home" = { + device = "/dev/disk/by-uuid/home"; + fsType = "ext4"; + }; + }; + swapDevices = [ { device = "/dev/disk/by-label/swap"; }]; +}