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

55 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-15 17:01:55 +00:00
{ config, pkgs, ... }:
{
2023-07-15 18:55:50 +00:00
services = {
avahi = {
2023-07-15 17:01:55 +00:00
enable = true;
2023-07-15 18:55:50 +00:00
openFirewall = true;
2023-07-15 17:01:55 +00:00
};
2023-07-15 17:01:55 +00:00
clamav = {
daemon.enable = true;
updater.enable = true;
};
ntp = {
2023-07-15 17:01:55 +00:00
enable = true;
};
thermald = {
2023-07-16 09:34:33 +00:00
enable = true;
};
fstrim = {
enable = true;
};
locate = {
enable = true;
locate = pkgs.plocate;
interval = "hourly";
localuser = null;
2023-07-16 09:34:33 +00:00
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
2023-07-16 09:34:33 +00:00
};
# Enable the X11 windowing system.
2023-07-15 17:01:55 +00:00
xserver = {
enable = true;
# Configure keymap in X11
2023-07-15 17:01:55 +00:00
layout = "fr";
xkbOptions = "eurosign:e,caps:escape";
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
2023-07-15 17:01:55 +00:00
};
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"
'';
2023-07-15 17:01:55 +00:00
};
}