90 lines
2.2 KiB
Nix
90 lines
2.2 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
# SERVICES
|
|
virtualisation.libvirtd.enable = true;
|
|
services = {
|
|
printing = {
|
|
enable = true;
|
|
drivers = [ pkgs.brlaser pkgs.hplip];
|
|
};
|
|
avahi = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
blueman = {
|
|
enable = true;
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|
|
|
|
fstrim = {
|
|
enable = true;
|
|
};
|
|
|
|
# ADD group plocate to your user
|
|
locate = {
|
|
enable = true;
|
|
locate = pkgs.plocate;
|
|
interval = "hourly";
|
|
localuser = null;
|
|
};
|
|
|
|
xserver = {
|
|
enable = true;
|
|
autorun = true;
|
|
videoDrivers = [ "Intel" ];
|
|
windowManager.i3 = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [
|
|
i3lock
|
|
];
|
|
};
|
|
xautolock = {
|
|
enable = true;
|
|
time = 10;
|
|
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
|
|
};
|
|
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 ];
|
|
};
|
|
};
|
|
|
|
udev.extraRules = ''
|
|
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/alexandre/.Xauthority" RUN+="${pkgs.sudo}/bin/sudo -u alexandre ${pkgs.xautolock}/bin/xautolock -locknow"
|
|
'';
|
|
};
|
|
}
|