dotfiles/pindakaas/hardware.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

{ pkgs, lib, config, nixos-hardware, ... }:
2023-10-28 22:09:36 +02:00
{
config = {
boot = {
# nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore?
kernelPackages = pkgs.linuxPackages;
2023-11-28 00:34:30 +01:00
# EFI Variables don't seem to work (no generation appear in systemd-boot with SD)
loader.efi.canTouchEfiVariables = false;
};
2023-11-28 00:34:30 +01:00
frogeye.desktop = {
x11_screens = [ "DP-1" "eDP-1" ];
maxVideoHeight = 1080;
phasesCommands = {
jour = ''
${pkgs.brightnessctl}/bin/brightnessctl set 3500
'';
crepuscule = ''
${pkgs.brightnessctl}/bin/brightnessctl set 3000
'';
nuit = ''
${pkgs.brightnessctl}/bin/brightnessctl set 700
'';
};
2023-11-28 00:34:30 +01:00
};
# Hardware decoding as suggested in link, works but doesn't seem to help much
# (at least in dropped frames and perf stat output).
# https://wiki.pine64.org/wiki/Mainline_Hardware_Decoding#mpv
# Might be worth if using CI to build.
2024-02-19 00:55:45 +01:00
home-manager.sharedModules = [{
# gpu-hq is too much for it to handle, even with hw decoding
config.programs.mpv.config.profile = lib.mkForce "default";
}];
2024-02-19 00:55:45 +01:00
zramSwap = {
# Not capable of building itself otherwise
enable = true;
memoryPercent = 150; # Factory settings
};
2023-12-22 19:57:09 +01:00
# Fixes black font on Alacritty
environment.variables.PAN_MESA_DEBUG = "gl3";
};
imports = [
nixos-hardware.nixosModules.pine64-pinebook-pro
];
2023-10-28 22:09:36 +02:00
}