Compare commits

..

4 commits

Author SHA1 Message Date
janis f2436bc0a0
emacs-lsp-booster 2025-09-12 15:09:20 +02:00
janis 07d318b15c
make cpu/battery stuff configurable 2025-09-12 15:09:08 +02:00
janis d746cbc265
install spotify and zed 2025-09-10 20:00:21 +02:00
janis 57706a9523
disable emacs servce 2025-09-10 20:00:16 +02:00
5 changed files with 56 additions and 30 deletions

View file

@ -122,6 +122,8 @@ in {
xdg-utils
vanilla-dmz
(discord.override {withVencord = true;})
spotify
zed-editor-fhs
bitwarden-desktop
bitwarden-cli

View file

@ -53,6 +53,9 @@ in {
# jinx from emacsPackages
emacsPackages.jinx
# LSP support
emacs-lsp-booster
# language servers
pkgs.unstable.rust-analyzer
nixd];
@ -62,10 +65,10 @@ in {
# source = emacs-config;
# };
# };
services.emacs = {
enable = true;
package = emacs;
};
# services.emacs = {
# enable = true;
# package = emacs;
# };
programs.emacs = {
enable = true;
package = emacs;

View file

@ -6,6 +6,7 @@
];
has_battery = true;
useThermald = true;
desktop_scale = 1.3;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];

View file

@ -35,5 +35,23 @@
default = {};
description = "Additional config for sway outputs";
};
cpufreqConfig = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = {};
description = "Additional config for auto-cpufreq";
};
useThermald = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Use thermald for thermal management";
};
tlpConfig = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = {};
description = "Additional config for TLP";
};
};
}

View file

@ -1,4 +1,4 @@
{inputs, pkgs, config, ...}: {
{inputs, lib, pkgs, config, ...}: {
imports = [
../options.nix
];
@ -151,33 +151,35 @@
dnsovertls = "true";
};
# thermald.enable = true;
# tlp = {
# enable = true;
# settings = {
# START_CHARGE_THRESH_BAT0 = 50;
# STOP_CHARGE_THRESH_BAT0 = 85;
# };
# };
# auto-cpufreq = {
# enable = true;
# settings = {
# battery = {
# governor = "powersave"; # Set the CPU governor to powersave.
# energy_performance_preference = "powersave";
# turbo = "never";
thermald.enable = config.useThermald;
# # enable_thresholds = true;
# # start_threshold = 50;
# # stop_threshold = 90;
# };
tlp = lib.mkIf (config.has_battery) {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 50;
STOP_CHARGE_THRESH_BAT0 = 85;
};
} // config.tlpConfig or {};
# charger = {
# governor = "performance"; # Set the CPU governor to performance when charging.
# turbo = "auto";
# };
# };
# };
auto-cpufreq = lib.mkIf (config.has_battery) {
enable = true;
settings = {
battery = {
governor = "powersave"; # Set the CPU governor to powersave.
energy_performance_preference = "powersave";
turbo = "never";
# enable_thresholds = true;
# start_threshold = 50;
# stop_threshold = 90;
};
charger = {
governor = "performance"; # Set the CPU governor to performance when charging.
turbo = "auto";
};
};
} // config.cpufreqConfig or {};
pipewire = {
enable = true;