diff --git a/desktop/activation-manuelle/laptop.nix b/desktop/activation-manuelle/laptop.nix deleted file mode 100644 index f31a388..0000000 --- a/desktop/activation-manuelle/laptop.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf; - cfg = config.r6d.config-generator; - computers = config.r6d.computers; - profiles = config.r6d.profiles; - -in mkIf cfg.laptop { - # Paquets spécifiques pour un ordinateur portable - - ## Activation d'un gestionnaire de réseau - networking.networkmanager.enable = true; - - hardware.bluetooth.enable = true; - - environment.systemPackages = with pkgs; [ - networkmanagerapplet - ]; - - services.xserver.synaptics = { - enable = true; - twoFingerScroll = true; - }; -} diff --git a/public/laptop.nix b/public/laptop.nix index 5a3149e..b9e42f3 100644 --- a/public/laptop.nix +++ b/public/laptop.nix @@ -10,5 +10,16 @@ in mkIf cfg.laptop { # Gestion spécifique pour PC portable + + ## Gestion de l'énergie powerManagement.cpuFreqGovernor = "powersave"; + + ## Activation d'un gestionnaire de réseau + networking.networkmanager.enable = true; + + hardware.bluetooth.enable = true; + + environment.systemPackages = with pkgs; [ + networkmanagerapplet + ]; } diff --git a/public/public.nix b/public/public.nix index 77473be..ac40a67 100644 --- a/public/public.nix +++ b/public/public.nix @@ -22,6 +22,7 @@ ./auto-upgrade.nix # mise à jour automatique du système ./laptop.nix # appli & configuration adaptée pour un PC portable ./print.nix # configuration de base de cups + ./service-laptop.nix # services spécifiques aux pc portables ./service-locate.nix # service locate ./swap.nix # définition de l'utilisation du swap diff --git a/public/service-laptop.nix b/public/service-laptop.nix new file mode 100644 index 0000000..36c3ff3 --- /dev/null +++ b/public/service-laptop.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.laptop { + + # Gestion spécifique pour PC portable + + services.xserver.synaptics = { + enable = true; + twoFingerScroll = true; + }; +}