nixos-config/hosts/dell-5590/nixos/services.nix

73 lines
1.9 KiB
Nix
Raw Normal View History

2021-12-16 13:04:27 +00:00
{ config, pkgs, ... }:
{
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
services.blueman.enable = true;
2021-12-16 13:04:27 +00:00
# SERVICES
services = {
clamav = {
daemon.enable = true;
updater.enable = true;
};
ntp.enable = true;
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_SCALING_GOVERNOR_ON_AC="powersave";
# The following prevents the battery from charging fully to
# preserve lifetime. Run `tlp fullcharge` to temporarily force
# full charge.
# https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds
START_CHARGE_THRESH_BAT0=40;
STOP_CHARGE_THRESH_BAT0=50;
# 100 being the maximum, limit the speed of my CPU to reduce
# heat and increase battery usage:
CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60;
};
};
# ADD group plocate to your user
locate = {
enable = true;
locate = pkgs.plocate;
interval = "hourly";
localuser = null;
};
2021-12-16 13:04:27 +00:00
xserver = {
enable = true;
autorun = true;
2022-03-29 11:47:21 +00:00
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
i3lock
];
2022-03-29 11:47:21 +00:00
};
xautolock = {
enable = true;
time = 10;
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
2022-03-29 11:47:21 +00:00
};
2021-12-16 13:04:27 +00:00
displayManager.defaultSession = "none+i3";
layout = "fr";
xkbOptions = "eurosign:e";
desktopManager = {
xterm.enable = false;
xfce.enable = true;
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
2021-12-16 13:04:27 +00:00
};
};
2022-03-29 11:47:21 +00:00
udev.extraRules = ''
2022-09-14 17:26:52 +00:00
ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
2022-03-29 11:47:21 +00:00
'';
2021-12-16 13:04:27 +00:00
};
}