From c5bbfaccd4541b5d8c68523bc3cacdb5ea39f7b4 Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Thu, 26 Dec 2024 12:07:35 -0300 Subject: [PATCH] general update --- .config/doom/config.el | 2 ++ .config/hypr/hyprland.conf | 4 +++ .config/waybar/style.css | 2 +- nix/configuration.nix | 2 ++ nix/configurations/overlays.nix | 2 -- nix/configurations/samba.nix | 41 +++++++++++++++++++++++++ nix/home-manager/programs/games.nix | 4 ++- nix/hosts/asus-zenbook-oled/default.nix | 29 +++++++++++++++-- 8 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 nix/configurations/samba.nix diff --git a/.config/doom/config.el b/.config/doom/config.el index 05980a6..20f3add 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -139,7 +139,9 @@ (setq lsp-headerline-breadcrumb-enable nil lsp-signature-render-documentation nil lsp-signature-function 'lsp-signature-posframe + lsp-signature-auto-activate nil lsp-semantic-tokens-enable t + lsp-enable-indentation nil lsp-idle-delay 0.05 ;; Smoother LSP features response in cost of performance (Most servers I use have good performance) lsp-use-plists nil) (add-hook 'lsp-after-apply-edits-hook (lambda (&rest _) (save-buffer))) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 1dc308f..165f9bb 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -102,5 +102,9 @@ windowrulev2 = workspace 5 silent, class:^(org.gnome.Nautilus)$ windowrulev2 = workspace 5 silent, class:^(zoom)$ windowrulev2 = workspace 5 silent, class:^(Discord|discord)$ windowrulev2 = workspace 5 silent, class:^(lutris)$ +windowrulev2 = workspace 5 silent , title:^(Godot|godot)$ windowrulev2 = workspace 6 silent, class:^(Gimp|gimp)$ windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus + +# Godot +windowrulev2 = minsize 800 600, class:^(Godot|godot)$ diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 71e2f40..1b43c4d 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -56,7 +56,7 @@ window#waybar { #backlight { border-top-color: @green; } #pulseaudio { border-top-color: @purple; } #pulseaudio.muted { border-top-color: @red; } -#pulseaudio.bluetooth { color: @purple; } +#pulseaudio.bluetooth { color: @cyan; } #bluetooth { border-top-color: @cyan; } #bluetooth.connected { color: @cyan; } #battery { border-top-color: @red; } diff --git a/nix/configuration.nix b/nix/configuration.nix index e1063ea..3c5686c 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -13,6 +13,7 @@ in ./configurations/hardware.nix ./configurations/desktop.nix ./configurations/cli.nix + ./configurations/samba.nix ./configurations/misc.nix ]; @@ -31,6 +32,7 @@ in extraGroups = [ "wheel" "docker" + "gamemode" "networkmanager" "vboxusers" "video" diff --git a/nix/configurations/overlays.nix b/nix/configurations/overlays.nix index 262c93a..9a8ba81 100644 --- a/nix/configurations/overlays.nix +++ b/nix/configurations/overlays.nix @@ -21,12 +21,10 @@ in { inherit system; config = prev.config; }; - vpn = import inputs.vpn { inherit system; config = prev.config; }; - }) ]; } diff --git a/nix/configurations/samba.nix b/nix/configurations/samba.nix new file mode 100644 index 0000000..bd5cc5a --- /dev/null +++ b/nix/configurations/samba.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +{ + services.samba = { + enable = true; + openFirewall = true; + extraConfig = '' + workgroup = SAMBA + server string = %h server (Samba %v) + netbios name = smbnix + security = user + #use sendfile = yes + #max protocol = smb2 + # note: localhost is the ipv6 localhost ::1 + hosts allow = 192.168.15. 127.0.0.1 localhost + + hosts deny = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + ''; + shares = { + public = { + path = "/mnt/samba/Public"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "greg"; + }; + }; + }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + networking.firewall.enable = true; + networking.firewall.allowPing = true; +} diff --git a/nix/home-manager/programs/games.nix b/nix/home-manager/programs/games.nix index 5d9400c..7dba314 100644 --- a/nix/home-manager/programs/games.nix +++ b/nix/home-manager/programs/games.nix @@ -5,8 +5,10 @@ # dolphin-emu-beta lutris wineWowPackages.staging - godot_4 + master.godot_4 + steam-run cemu winetricks + gamemode ]; } diff --git a/nix/hosts/asus-zenbook-oled/default.nix b/nix/hosts/asus-zenbook-oled/default.nix index c59bd66..c9e6f40 100644 --- a/nix/hosts/asus-zenbook-oled/default.nix +++ b/nix/hosts/asus-zenbook-oled/default.nix @@ -26,7 +26,7 @@ networking.hostName = "gregnix-personal"; boot = { - kernelParams = [ "i915.force_probe=7d55" ]; + kernelParams = [ "i915.force_probe=7d55" "intel_pstate=disable" ]; extraModprobeConfig = '' options bluetooth disable_ertm=1 options snd-hda-intel model=asus-zenbook @@ -49,7 +49,30 @@ fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; - swapDevices = [ {device = "/dev/disk/by-uuid/5481837c-82f0-4231-880a-88df2c154d56";} ]; + swapDevices = [ {device = "/dev/disk/by-uuid/54eb3f94-cafd-4afa-beb3-0e126a346252";} ]; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + # powerManagement.cpuFreqGovernor = "performance"; + + powerManagement.enable = false; + services.thermald.enable = false; + services.tlp.enable = false; + + services.auto-cpufreq = { + enable = true; + settings = { + battery = { + # governor = "powersave"; + # energy_performance_preference = "power"; + # turbo = "never"; + governor = "performance"; + energy_performance_preference = "performance"; + turbo = "auto"; + }; + charger = { + governor = "performance"; + energy_performance_preference = "performance"; + turbo = "auto"; + }; + }; + }; }