testing the new config before pushing to main

This commit is contained in:
ooks-io 2024-01-19 20:28:53 +13:00
parent a545953c2d
commit c53123d2c5
38 changed files with 370 additions and 198 deletions

View file

@ -0,0 +1,22 @@
{ lib, config, ... }:
let
cfg = config.systemModules.hardware.backlight;
in
{
config = lib.mkIf cfg.enable {
hardware.brillo.enable = true;
services.clight = {
enable = true;
settings = {
verbose = true;
backlight.disabled = true;
dpms.timeouts = [900 300];
dimmer.timeouts = [870 270];
gamma.long_transition = true;
screen.disabled = true;
};
};
};
}

View file

@ -1,14 +0,0 @@
{
hardware.brillo.enable = true;
services.clight = {
enable = true;
settings = {
verbose = true;
backlight.disabled = true;
dpms.timeouts = [900 300];
dimmer.timeouts = [870 270];
gamma.long_transition = true;
screen.disabled = true;
};
};
}

View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.systemModules.hardware.bluetooth;
in
{
config = lib.mkIf cfg.enable {
hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
};
environment.systemPackages = with pkgs; [
galaxy-buds-client
live-buds-cli
bluetuith
];
# https://github.com/NixOS/nixpkgs/issues/114222
systemd.user.services.telephony_client.enable = false;
};
}

View file

@ -1,17 +0,0 @@
{ config, lib, pkgs, ... }:
{
hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
};
environment.systemPackages = with pkgs; [
galaxy-buds-client
live-buds-cli
bluetuith
];
# https://github.com/NixOS/nixpkgs/issues/114222
systemd.user.services.telephony_client.enable = false;
}

View file

@ -0,0 +1,21 @@
{ lib, ... }:
{
imports = [
./bluetooth.nix
./backlight.nix
./power.nix
];
options.systemModules.hardware = {
bluetooth = {
enable = lib.mkEnableOption "Enable bluetooth module";
};
backlight= {
enable = lib.mkEnableOption "Enable backlight module";
};
power = {
enable = lib.mkEnableOption "Enable power module";
};
};
}

View file

@ -0,0 +1,32 @@
{ lib, config, ... }:
let
cfg = config.systemModules.hardware.power;
in
{
config = lib.mkIf cfg.enable {
services.system76-scheduler.settings.cfsProfiles.enable = true;
services.tlp = {
enable = true;
settings = {
cpu_boost_on_ac = 1;
cpu_boost_on_bat = 0;
cpu_scaling_governor_on_ac = "performance";
cpu_scaling_governor_on_bat = "powersave";
};
};
services = {
upower.enable = true;
thermald.enable = true;
power-profiles-daemon.enable = false;
logind = {
lidSwitch = "suspend";
};
};
powerManagement.powertop.enable = true;
};
}