testing the new config before pushing to main
This commit is contained in:
parent
a545953c2d
commit
c53123d2c5
38 changed files with 370 additions and 198 deletions
22
system/modules/hardware/backlight.nix
Normal file
22
system/modules/hardware/backlight.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
system/modules/hardware/bluetooth.nix
Normal file
23
system/modules/hardware/bluetooth.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
21
system/modules/hardware/default.nix
Normal file
21
system/modules/hardware/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
32
system/modules/hardware/power.nix
Normal file
32
system/modules/hardware/power.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue