1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

hw-config for dell, fixed to_system.sh script

Signed-off-by: Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>
This commit is contained in:
Stefan Ellmauthaler 2021-10-11 14:40:38 +02:00
parent e34ea114a3
commit 0700681fb0
15 changed files with 110 additions and 5 deletions

View File

@ -13,3 +13,6 @@
* generate home-instance * generate home-instance
* add unlock-secret to secret-store (secret-tool store --label='keepassxc' keepass unlock) * add unlock-secret to secret-store (secret-tool store --label='keepassxc' keepass unlock)
* add certs and keyfiles * add certs and keyfiles
## Hardware specifics
https://github.com/NixOS/nixos-hardware

View File

@ -234,8 +234,8 @@ bindsym Mod1+space exec --no-startup-id .config/i3/keyboard_layout_toggle.sh
exec --no-startup-id .config/i3/keepassxc.sh exec --no-startup-id .config/i3/keepassxc.sh
# autostart other stuff # autostart other stuff
exec --no-startup-id i3-msg 'workspace 4: comms; exec signal-desktop' #exec --no-startup-id i3-msg 'workspace 4: comms; exec signal-desktop'
exec --no-startup-id i3-msg 'workspace 4: comms; exec element-desktop' #exec --no-startup-id i3-msg 'workspace 4: comms; exec element-desktop'
# application specific stuff # application specific stuff
for_window[class="KeePassXC"] floating enable for_window[class="KeePassXC"] floating enable

View File

@ -42,13 +42,15 @@
crtc = 0; crtc = 0;
position = "3840x0"; position = "3840x0";
mode = "3840x2160"; mode = "3840x2160";
dpi = 288; #dpi = 288;
dpi = 96;
}; };
DP-2 = { DP-2 = {
enable = true; enable = true;
primary = true; primary = true;
mode = "3840x2160"; mode = "3840x2160";
dpi = 144; #dpi = 144;
dpi = 96;
position = "0x0"; position = "0x0";
}; };
}; };

View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
boot.initrd.kernelModules = [ "i915" ];
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
}

View File

@ -0,0 +1,8 @@
{
imports = [ ../. ];
boot.kernelParams = [
"i915.enable_fbc=1"
"i915.enable_psr=2"
];
}

View File

@ -0,0 +1,9 @@
{
imports = [ ../. ];
# Enables RC6, RC6p and RC6pp.
# Last two are only available on Sandy Bridge CPUs (circa 2011).
boot.kernelParams = [
"i915.enable_rc6=7"
];
}

View File

@ -0,0 +1,9 @@
{ config, lib, ... }:
{
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
"ath3k"
];
services.xserver.libinput.enable = lib.mkDefault true;
}

View File

@ -0,0 +1,10 @@
# acpi_call makes tlp work for newer thinkpads
{ config, ... }:
{
boot = {
kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
};
}

View File

@ -0,0 +1,11 @@
{ config, lib, ... }:
{
imports = [ ../. ];
# Gnome 40 introduced a new way of managing power, without tlp.
# However, these 2 services clash when enabled simultaneously.
# https://github.com/NixOS/nixos-hardware/issues/260
services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|| !config.services.power-profiles-daemon.enable);
}

View File

@ -0,0 +1,8 @@
{ lib, ... }:
{
imports = [ ../../hdd ];
# Hard disk protection if the laptop falls:
services.hdapsd.enable = lib.mkDefault true;
}

View File

@ -0,0 +1 @@
../ssd

View File

@ -0,0 +1,9 @@
{ lib, ... }:
{
boot.kernel.sysctl = {
"vm.swappiness" = lib.mkDefault 1;
};
services.fstrim.enable = lib.mkDefault true;
}

View File

@ -1,5 +1,8 @@
{ config, pkgs, ...}: { config, pkgs, ...}:
{ {
imports = [
./dell-specific.nix
];
networking.hostName = "stel-xps"; # define the hostname networking.hostName = "stel-xps"; # define the hostname
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -0,0 +1,17 @@
{ lib, pkgs, ... }:
{
imports = [
./common/cpu/intel
./common/pc/laptop
./common/pc/laptop/ssd
];
boot.kernelParams = [ "mem_sleep_default=deep" ];
# older version break wifi:
# - https://github.com/NixOS/nixos-hardware/issues/173
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest;
services.thermald.enable = true;
}

View File

@ -6,7 +6,7 @@ cp configuration.nix /etc/nixos/.
cp -r programs /etc/nixos/. cp -r programs /etc/nixos/.
mkdir -p /etc/nixos/machine mkdir -p /etc/nixos/machine
for machine in `ls -al machine | grep "^d" | rev | cut -d" " -f1 | rev`; do for machine in `ls -al machine | grep "^d" | rev | cut -d" " -f1 | rev`; do
cp -r machine/$machine /etc/nixos/machine/. cp -r machine/${machine} /etc/nixos/machine/
done done
cp -r ./home/config/* /home/ellmau/.config/. cp -r ./home/config/* /home/ellmau/.config/.