power stuff and disable docker

This commit is contained in:
Kopatz
2024-06-07 17:35:18 +02:00
parent 9e83178ef2
commit 62c3617800
8 changed files with 274 additions and 238 deletions

View File

@@ -94,6 +94,7 @@ in {
"backlight".states = [ 0 50 ];
"backlight".format-icons = [ "" "" ];
"battery".states.good = 95;
"battery".interval = 5;
"battery".states.warning = 30;
"battery".states.critical = 15;
"battery".format = "{capacity}% / {power:.2}W {icon}";

View File

@@ -1,4 +1,7 @@
{ pkgs, config, ... }: {
{ osConfig, pkgs, config, lib, ... }:
let cfg = osConfig.custom.graphical.i3;
in {
config = lib.mkIf cfg.enable {
home.file.".config/i3" = {
enable = true;
recursive = true;
@@ -59,7 +62,8 @@
module-margin = 1;
modules-left = "i3";
modules-center = "xwindow";
modules-right = "network memory cpu cpu-temp gpu pulseaudio date tray";
modules-right =
"network memory cpu cpu-temp gpu pulseaudio date tray";
cursor-click = "pointer";
cursor-scroll = "ns-resize";
enable-ipc = true;
@@ -229,4 +233,5 @@
};
};
};
};
}

View File

@@ -13,21 +13,19 @@
ld.enable = true;
settings.enable = true;
};
misc = {
docker.enable = true;
};
hardware = {
firmware.enable = true;
ssd.enable = true;
tablet.enable = true;
#tablet.enable = true;
#fingerprint.enable = true;
};
graphical = {
audio.enable = true;
code = {
enable = true;
android.enable = true;
#android.enable = true;
};
emulators.enable = true;
#emulators.enable = true;
gamemode.enable = true;
gnome.enable = true;
hyprland.enable = true;

View File

@@ -9,5 +9,6 @@
./wooting.nix
./tpm.nix
./tablet.nix
./fingerprint.nix
];
}

View File

@@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
let cfg = config.custom.hardware.fingerprint;
in {
options.custom.hardware.fingerprint = {
enable = lib.mkEnableOption "Enables fingerprint sensor support";
};
config = lib.mkIf cfg.enable {
services.fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-goodix;
};
};
};
}

View File

@@ -59,11 +59,11 @@
services.xserver.libinput.enable = true;
### docker
virtualisation.docker.enable = true;
#virtualisation.docker.enable = true;
systemd.tmpfiles.rules = [
"d /docker-data 0755 kopatz users"
];
#systemd.tmpfiles.rules = [
# "d /docker-data 0755 kopatz users"
#];
security.pki.certificates = [ ''
-----BEGIN CERTIFICATE-----

View File

@@ -5,14 +5,28 @@
# Better scheduling for CPU cycles - thanks System76!!!
services.system76-scheduler.settings.cfsProfiles.enable = true;
services.upower.enable = true;
environment.systemPackages = with pkgs; [ gnome.gnome-power-manager ];
# Enable TLP (better than gnomes internal power manager)
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";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
#Optional helps save long term battery health
#START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
#STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
@@ -28,4 +42,3 @@
# toggle tlp off if this is on
# services.auto-cpufreq.enable = true;
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ...}:
{ osConfig, config, pkgs, inputs, lib, ...}:
{
home = {
# This value determines the Home Manager release that your
@@ -30,7 +30,7 @@
../../home-manager/i3.nix
inputs.nixvim.homeManagerModules.nixvim
inputs.nix-colors.homeManagerModule
];
] ++ lib.optional osConfig.custom.graphical.i3.enable ../../home-manager/i3.nix; # need this hack because i3 uses stylix, and it errors otherwise
colorScheme = import ../../home-manager/themes/yorha/colors.nix;
}