From 562839d47df632c0746dc61748f211e1500a6381 Mon Sep 17 00:00:00 2001 From: k Date: Sat, 11 Jan 2025 23:57:50 -0500 Subject: [PATCH] Cleanup and minor changes --- hosts/home/hyprland.nix | 16 +++++++-- hosts/laptop/configuration.nix | 21 ++++++++---- hosts/server/configuration.nix | 16 +++------ hosts/server/home.nix | 2 +- hosts/server/service.nix | 63 ++++------------------------------ 5 files changed, 41 insertions(+), 77 deletions(-) diff --git a/hosts/home/hyprland.nix b/hosts/home/hyprland.nix index 06ab1cc..abec126 100644 --- a/hosts/home/hyprland.nix +++ b/hosts/home/hyprland.nix @@ -5,7 +5,19 @@ ... }: { imports = [./waybar.nix ./tile.nix]; - programs = {hyprlock = {enable=true;};}; + home.packages = with pkgs; [ + hyprlock + hyprpaper + iio-hyprland + batsignal + jq #iio-hyprland needs this + ]; + + services = { + hypridle.enable=true; + hyprpaper.enable=true; + }; + wayland.windowManager.hyprland = { enable = true; systemd.variables = ["--all"]; @@ -13,8 +25,8 @@ settings = { exec-once = [ - "${pkgs.hyprpaper}/bin/hyprpaper" "${pkgs.iio-hyprland}/bin/iio-hyprland" + "${pkgs.batsignal}/bin/batsignal -n BAT0 -b" ]; monitor = "eDP-1,preferred,auto,1"; general = { diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 78c556f..313b624 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -68,11 +68,23 @@ tlp = { enable = true; settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_AC = "ondemand"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_BOOST_ON_AC="1"; + CPU_BOOST_ON_BAT="0"; + + CPU_HWP_DYN_BOOST_ON_AC="1"; + CPU_HWP_DYN_BOOST_ON_BAT="0"; + + PLATFORM_PROFILE_ON_AC="performance"; + PLATFORM_PROFILE_ON_BAT="low-power"; + + MEM_SLEEP_ON_AC="s2idle"; + MEM_SLEEP_ON_BAT="deep"; }; }; logind = { @@ -117,11 +129,6 @@ package = pkgs.nerdfonts; name = "Iosevka NFM"; }; - - # emoji = { - # package = pkgs.notofonts; - # name = "Noto Color Emoji"; - # }; }; }; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 7bf6192..1e5d3c2 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -5,10 +5,9 @@ ... }: { imports = [./hardware-configuration.nix ./service.nix]; - powerManagement.enable = false; + powerManagement.enable = true; system.autoUpgrade.enable = true; networking.networkmanager.enable = true; - boot.kernelParams = ["intel_pstate=active"]; nix = { gc.automatic = true; @@ -21,10 +20,10 @@ nixpkgs.config.allowUnfree = true; programs = { - nix-ld.enable = true; - nix-ld.libraries = with pkgs; [glibc glib]; zsh.enable = true; + neovim.enable = true; }; + users = { motd = "Welcome to the Server"; defaultUserShell = pkgs.zsh; @@ -56,17 +55,12 @@ hardware.graphics = { enable = true; extraPackages = with pkgs; [ - intel-compute-runtime + intel-vaapi-driver intel-media-driver - vaapiIntel - vaapiVdpau - libvdpau-va-gl - vpl-gpu-rt + intel-compute-runtime ]; }; - services.xserver.videoDrivers = ["intel"]; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/server/home.nix b/hosts/server/home.nix index 22dc964..3b1a21b 100644 --- a/hosts/server/home.nix +++ b/hosts/server/home.nix @@ -5,5 +5,5 @@ ... }: { imports = [../home/home_common.nix]; - home = {packages = with pkgs; [docker docker-compose];}; + home = {packages = with pkgs; [docker docker-compose neovim];}; } diff --git a/hosts/server/service.nix b/hosts/server/service.nix index b9354a4..55fc65c 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -5,8 +5,8 @@ }: { networking.firewall = { enable = true; - allowedTCPPorts = [80 443 22 26615 25565 24454 8080 53]; - allowedUDPPorts = [26615 25565 24454 8080 53]; + allowedTCPPorts = [80 443 22]; + allowedUDPPorts = []; }; security.acme = { @@ -37,46 +37,6 @@ package = pkgs.ollama-intel; }; - crab-hole = { - enable = true; - settings = { - api = { - listen = "192.168.0.2"; - port = 8080; - show_doc = true; - }; - downstream = [ - { - listen = "192.168.0.2"; - port = 53; - protocol = "udp"; - } - ]; - upstream = { - name_servers = [ - { - protocol = "tls"; - socket_addr = "[2606:4700:4700::1111]:853"; - tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com"; - trust_nx_responses = false; - } - { - protocol = "tls"; - socket_addr = "1.1.1.1:853"; - tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com"; - trust_nx_responses = false; - } - ]; - }; - blocklist.lists = [ - "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" - "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt" - "https://raw.githubusercontent.com/anudeepND/blacklist/master/CoinMiner.txt" - "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" - ]; - }; - }; - gitea = { enable = true; settings = { @@ -114,7 +74,7 @@ http = { use_x_forwarded_for = "true"; trusted_proxies = ["127.0.0.1"]; - server_port = 8003; + server_port = 8002; }; }; }; @@ -135,7 +95,7 @@ searx = { enable = true; settings = { - server.port = 8005; + server.port = 8003; server.secret_key = "secretlol"; search.formats = ["html" "json"]; }; @@ -191,29 +151,20 @@ }; }; - "srx.dhilton.xyz" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8005"; - proxyWebsockets = true; - }; - }; - "hom.dhilton.xyz" = { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://127.0.0.1:8003"; + proxyPass = "http://127.0.0.1:8002"; proxyWebsockets = true; }; }; - "map.dhilton.xyz" = { + "srx.dhilton.xyz" = { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://127.0.0.1:8100"; + proxyPass = "http://127.0.0.1:8003"; proxyWebsockets = true; }; };