diff --git a/hosts/dell-5590/nixos/configuration.nix b/hosts/dell-5590/nixos/configuration.nix index 9628c6e..ab542d9 100644 --- a/hosts/dell-5590/nixos/configuration.nix +++ b/hosts/dell-5590/nixos/configuration.nix @@ -134,13 +134,8 @@ isNormalUser = true; home = "/home/alexandre"; description = "alexandre"; - extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "vboxusers" "scanner" "lp" ]; + extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "vboxusers" "scanner" "lp" "plocate" ]; hashedPassword = "$6$7m77oPQxa$W9YnRLo1X2eqztBHwpoH8diHGkBno5O39AMyL9Qm8y8I6uW63H2Nwx4p239OG5zhOxA8J1lZvHTQ3hKPSP9mT/"; }; }; -nix = { - package = pkgs.nixfmt; - extraOptions = ''experimental-features = nix-command fmt''; -}; - } diff --git a/hosts/dell-5590/nixos/services.nix b/hosts/dell-5590/nixos/services.nix index 53e3292..eadd486 100644 --- a/hosts/dell-5590/nixos/services.nix +++ b/hosts/dell-5590/nixos/services.nix @@ -30,7 +30,31 @@ }; ntp.enable = true; - tlp.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; + }; +}; + # ADD group mlocate to your user + locate = { + enable = true; + locate = pkgs.plocate; + interval = "hourly"; + localuser = null; + }; xserver = { @@ -44,7 +68,7 @@ }; xautolock = { enable = true; - time = 1; + time = 10; locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png"; #notifier = "${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds'"; }; @@ -64,14 +88,6 @@ }; nixpkgs.config = { - - #packageOverrides = pkgs: { - # polybar = pkgs.polybar.override { - # i3Support = true; - # pulseSupport = true; - # }; - #}; - allowUnfree = true; }; diff --git a/hosts/dell-5590/nixpkgs/configs/i3config b/hosts/dell-5590/nixpkgs/configs/i3config index a0156f6..a254681 100644 --- a/hosts/dell-5590/nixpkgs/configs/i3config +++ b/hosts/dell-5590/nixpkgs/configs/i3config @@ -129,7 +129,7 @@ bar { bindsym $mod+$ALT+l exec i3lock -ti ~/images/coffee_time.png # blocage automatique de l'ecran en cas d'inactivité -exec xautolock -detectsleep -time 120 -corners -locker 'i3lock -ti ~/images/coffee_time.png' +exec xautolock -detectsleep -time 1200 -corners -locker 'i3lock -ti ~/images/coffee_time.png' # Capture d'ecran bindsym Print exec scrot -u '%Y-%m-%d-%T_$wx$h_scrot.png' -e 'mv $f ~/Screenshots/' @@ -148,3 +148,6 @@ exec --no-startup-id i3-msg 'workspace $ws1; exec alacritty;' exec --no-startup-id i3-msg 'workspace $ws1; exec ferdi;' exec --no-startup-id i3-msg 'workspace $ws2; exec thunderbird;' exec --no-startup-id i3-msg 'workspace $ws3; exec firefox;' + +exec --no-startup-id xset s off +exec --no-startup-id xset -dpms