2016-08-08 22:58:30 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2016-07-22 14:16:20 +02:00
|
|
|
|
|
|
|
|
let
|
2016-08-12 12:46:36 +02:00
|
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
2017-04-24 23:22:11 +02:00
|
|
|
annuaire = config.r6d.machines;
|
2021-05-06 23:50:07 +02:00
|
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
2017-05-31 00:23:10 +02:00
|
|
|
flags = currentMachine.configurationFlags;
|
2016-08-08 22:58:30 +02:00
|
|
|
in
|
|
|
|
|
|
2017-04-27 22:06:12 +02:00
|
|
|
mkIf flags.laptop {
|
2016-08-08 22:58:30 +02:00
|
|
|
|
2016-07-15 11:59:39 +02:00
|
|
|
# Gestion spécifique pour PC portable
|
2016-08-09 13:52:10 +02:00
|
|
|
|
|
|
|
|
## Gestion de l'énergie
|
2019-06-19 09:51:46 +02:00
|
|
|
services.tlp.enable = true;
|
2016-08-09 13:52:10 +02:00
|
|
|
|
|
|
|
|
## Activation d'un gestionnaire de réseau
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2019-06-23 19:12:47 +02:00
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
powerOnBoot = false;
|
|
|
|
|
};
|
2016-08-09 13:52:10 +02:00
|
|
|
|
2019-06-10 17:21:00 +02:00
|
|
|
# Gestion graphique du réseau dans la barre système
|
|
|
|
|
programs.nm-applet.enable = true;
|
|
|
|
|
|
2016-08-12 12:46:36 +02:00
|
|
|
# Paquets
|
2016-08-09 13:52:10 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
2016-10-10 22:11:44 +02:00
|
|
|
wirelesstools # fournis iwconfig
|
2019-06-23 19:13:23 +02:00
|
|
|
blueman # outils bluetooth (manager, system tray)
|
|
|
|
|
cbatticon # status de la batterie dans le system tray
|
2016-08-09 13:52:10 +02:00
|
|
|
];
|
2017-03-24 23:25:46 +01:00
|
|
|
|
|
|
|
|
# Services
|
2019-06-10 12:53:08 +02:00
|
|
|
services.xserver.libinput = {
|
2017-03-24 23:25:46 +01:00
|
|
|
enable = true;
|
|
|
|
|
};
|
2016-07-15 11:59:39 +02:00
|
|
|
}
|