diff --git a/flake.nix b/flake.nix index ffcc356..96e28ad 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # used for some packages - + # Only uncomment when needed. This uses a lot of space and compute ressources for sometimes not that much. If not used, make it follow unstable nixpkgs-master.follows = "nixpkgs-unstable"; #nixpkgs-master.url = "github:nixos/nixpkgs/master"; # used with precaution as they are untested and not cached diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index 83bb176..d851950 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -211,8 +211,8 @@ #"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center "Ctrl+Alt, 1, exec, qs ipc call notifications toggle" */ - # pos 4 1 notification center. - "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" + # pos 4 1 notification center. + "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" "Ctrl+Alt, 1, exec, [[ -f ~/.cache/hypr-battery-saver ]] || swaync-client -t" "Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd" "Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol diff --git a/modules/applications/mathematics.nix b/modules/applications/mathematics.nix index 2d8ce6e..e5cded2 100644 --- a/modules/applications/mathematics.nix +++ b/modules/applications/mathematics.nix @@ -3,5 +3,5 @@ _: { environment.systemPackages = with pkgs; [ elan ]; - }; + }; } diff --git a/modules/applications/waybar.nix b/modules/applications/waybar.nix index 9af7bcd..4567825 100644 --- a/modules/applications/waybar.nix +++ b/modules/applications/waybar.nix @@ -11,7 +11,7 @@ _: { "battery" "clock" ]; - + battery = { format = "{capacity}% {icon}"; states = { @@ -19,7 +19,7 @@ _: { critical = 15; }; }; - + clock = { format = "{:%H:%M}"; }; diff --git a/modules/applications/zsh.nix b/modules/applications/zsh.nix index 01b5c0e..cc40343 100644 --- a/modules/applications/zsh.nix +++ b/modules/applications/zsh.nix @@ -11,7 +11,7 @@ _: { caelestia-shell -n > /dev/null 2>&1 & disown fi ''; - + snrs = '' git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && @@ -50,7 +50,7 @@ _: { command cat "$@" fi } - + custom-eza() { # behaves differently if we just call it or if we pipe initContent if [[ -t 1 ]]; then eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@" diff --git a/modules/hardware/battery.nix b/modules/hardware/battery.nix index c7e7663..b40bdce 100644 --- a/modules/hardware/battery.nix +++ b/modules/hardware/battery.nix @@ -36,27 +36,29 @@ services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!! services.thermald.enable = false; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs) services.power-profiles-daemon.enable = true; # ppd is recommended over tlp for framework 16 - /*services.tlp = { - enable = true; # Enable TLP (better than gnomes internal power manager) - settings = { - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 1; - CPU_HWP_DYN_BOOST_ON_AC = 1; - CPU_HWP_DYN_BOOST_ON_BAT = 1; - CPU_SCALING_GOVERNOR_ON_AC = "balanced"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_ENERGY_PERF_POLICY_ON_AC = "balanced"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave"; - PLATFORM_PROFILE_ON_AC = "balanced"; - PLATFORM_PROFILE_ON_BAT = "powersave"; - STOP_CHARGE_THRESH_BAT1 = 80; - }; -<<<<<<< HEAD - };*/ + /* + services.tlp = { + enable = true; # Enable TLP (better than gnomes internal power manager) + settings = { + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 1; + CPU_HWP_DYN_BOOST_ON_AC = 1; + CPU_HWP_DYN_BOOST_ON_BAT = 1; + CPU_SCALING_GOVERNOR_ON_AC = "balanced"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balanced"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave"; + PLATFORM_PROFILE_ON_AC = "balanced"; + PLATFORM_PROFILE_ON_BAT = "powersave"; + STOP_CHARGE_THRESH_BAT1 = 80; + }; + <<<<<<< HEAD + }; + */ environment.systemPackages = [ self.packages.${pkgs.system}.custom-performance ]; - }; + }; perSystem = {pkgs, ...}: let NotifySound = ../../assets/battery_notify.mp3; in { @@ -362,7 +364,7 @@ pkill -f caelestia || true pkill shell || true pkill -f custom-wallpaper || true - + # Start lightweight notifications pkill swaync || true swaync & disown @@ -373,7 +375,7 @@ # Lower refresh rate (BIGGEST win) hyprctl keyword monitor "eDP-1,2560x1600@60,0x0,1" - + # Core performance toggles hyprctl --batch "\ keyword animations:enabled 0;\ @@ -421,12 +423,12 @@ if [[ -f "''${STATE}.brightness" ]]; then brightnessctl set "$(cat "''${STATE}.brightness")" 2>/dev/null || true fi - + rm -f "$STATE" "''${STATE}.brightness" - + notify-send "Battery Saver" "Disabled" } - + if [[ -f "$STATE" ]]; then disable else diff --git a/modules/hardware/performance.nix b/modules/hardware/performance.nix index 868124f..c238e4b 100644 --- a/modules/hardware/performance.nix +++ b/modules/hardware/performance.nix @@ -1,5 +1,5 @@ {self, ...}: { - flake.nixosModules.performance-desktop = {pkgs,...}: { + flake.nixosModules.performance-desktop = {pkgs, ...}: { environment.systemPackages = [ self.packages.${pkgs.system}.custom-performance ]; diff --git a/modules/utilities/nixUtils.nix b/modules/utilities/nixUtils.nix index 36964b6..5078834 100644 --- a/modules/utilities/nixUtils.nix +++ b/modules/utilities/nixUtils.nix @@ -1,4 +1,8 @@ -{inputs, self, ...}: { +{ + inputs, + self, + ... +}: { flake.nixosModules.nixUtils-laptop = _: { # nixpkgs-review crashed my laptop multiple times. We must reduce how much ressources it can take. # for reference, my laptop is a 12 core ryzen 7