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:
parent
e34ea114a3
commit
0700681fb0
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
15
machine/stel-xps/common/cpu/intel/default.nix
Normal file
15
machine/stel-xps/common/cpu/intel/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
||||||
8
machine/stel-xps/common/cpu/intel/kaby-lake/default.nix
Normal file
8
machine/stel-xps/common/cpu/intel/kaby-lake/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"i915.enable_fbc=1"
|
||||||
|
"i915.enable_psr=2"
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
];
|
||||||
|
}
|
||||||
9
machine/stel-xps/common/pc/default.nix
Normal file
9
machine/stel-xps/common/pc/default.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
|
||||||
|
"ath3k"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.xserver.libinput.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
10
machine/stel-xps/common/pc/laptop/acpi_call.nix
Normal file
10
machine/stel-xps/common/pc/laptop/acpi_call.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
machine/stel-xps/common/pc/laptop/default.nix
Normal file
11
machine/stel-xps/common/pc/laptop/default.nix
Normal 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);
|
||||||
|
}
|
||||||
8
machine/stel-xps/common/pc/laptop/hdd/default.nix
Normal file
8
machine/stel-xps/common/pc/laptop/hdd/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../../hdd ];
|
||||||
|
|
||||||
|
# Hard disk protection if the laptop falls:
|
||||||
|
services.hdapsd.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
1
machine/stel-xps/common/pc/laptop/ssd
Symbolic link
1
machine/stel-xps/common/pc/laptop/ssd
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../ssd
|
||||||
9
machine/stel-xps/common/pc/ssd/default.nix
Normal file
9
machine/stel-xps/common/pc/ssd/default.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"vm.swappiness" = lib.mkDefault 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fstrim.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
@ -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; [
|
||||||
|
|||||||
17
machine/stel-xps/dell-specific.nix
Normal file
17
machine/stel-xps/dell-specific.nix
Normal 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;
|
||||||
|
}
|
||||||
@ -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/.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user