nixos-config/hosts/d2nix/nixos/services.nix

55 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
services = {
avahi = {
enable = true;
openFirewall = true;
};
clamav = {
daemon.enable = true;
updater.enable = true;
};
ntp = {
enable = true;
};
thermald = {
enable = true;
};
fstrim = {
enable = true;
};
locate = {
enable = true;
locate = pkgs.plocate;
interval = "hourly";
localuser = null;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Enable the X11 windowing system.
xserver = {
enable = true;
# Configure keymap in X11
layout = "fr";
xkbOptions = "eurosign:e,caps:escape";
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
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.xdg-utils}/bin/xdg-screensaver lock"
'';
};
}