hosts: move to new structure
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
13
hosts/sarien/hardware/default.nix
Normal file
13
hosts/sarien/hardware/default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
imports = [
|
||||
./facter.nix
|
||||
./laptop
|
||||
./vaapi/intel-media-driver.nix
|
||||
];
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
14
hosts/sarien/hardware/facter.nix
Normal file
14
hosts/sarien/hardware/facter.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) mysecrets;
|
||||
inherit (config.networking) hostName;
|
||||
in {
|
||||
imports = with inputs; [
|
||||
nixos-facter-modules.nixosModules.facter
|
||||
];
|
||||
facter.reportPath = "${mysecrets}/facter/${hostName}.json";
|
||||
systemd.network.wait-online.enable = false;
|
||||
}
|
7
hosts/sarien/hardware/laptop/default.nix
Normal file
7
hosts/sarien/hardware/laptop/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./home-row-mods.nix
|
||||
./keyboard-fix.nix
|
||||
./power-saving.nix
|
||||
];
|
||||
}
|
20
hosts/sarien/hardware/laptop/home-row-mods.nix
Normal file
20
hosts/sarien/hardware/laptop/home-row-mods.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["0001:0001"];
|
||||
settings.main = {
|
||||
a = "lettermod(alt, a, 200, 150)";
|
||||
s = "lettermod(meta, s, 200, 150)";
|
||||
d = "lettermod(control, d, 200, 150)";
|
||||
f = "lettermod(shift, f, 200, 150)";
|
||||
j = "lettermod(shift, j, 200, 150)";
|
||||
k = "lettermod(control, k, 200, 150)";
|
||||
l = "lettermod(meta, l, 200, 150)";
|
||||
";" = "lettermod(alt, ;, 200, 150)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
hosts/sarien/hardware/laptop/keyboard-fix.nix
Normal file
21
hosts/sarien/hardware/laptop/keyboard-fix.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
services = {
|
||||
udev.extraHwdb = ''
|
||||
evdev:input:b0011v0001p0001eAB83*
|
||||
KEYBOARD_KEY_d5=sysrq
|
||||
KEYBOARD_KEY_d4=leftmeta
|
||||
KEYBOARD_KEY_95=brightnessdown
|
||||
KEYBOARD_KEY_91=brightnessup
|
||||
'';
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["0001:0001"];
|
||||
settings.main = {
|
||||
camera = "brightnessdown";
|
||||
prog1 = "brightnessup";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
7
hosts/sarien/hardware/laptop/power-saving.nix
Normal file
7
hosts/sarien/hardware/laptop/power-saving.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
powerManagement.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.upower.enable = true;
|
||||
}
|
7
hosts/sarien/hardware/vaapi/intel-media-driver.nix
Normal file
7
hosts/sarien/hardware/vaapi/intel-media-driver.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
vpl-gpu-rt
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user