From d3c2cd9d706263950d65f3fe54267cc8b7dc78d7 Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Mon, 3 Nov 2025 13:31:47 +0100 Subject: [PATCH] legoals fixes --- home/colors.nix | 76 ++++++++++++++---------- home/kdeconnect.nix | 12 ++++ home/niri.nix | 35 ++++++++++- home/zed.nix | 22 +++++-- hosts/legolas/hardware-configuration.nix | 29 ++++++++- modules/desktopApplications.nix | 2 +- 6 files changed, 135 insertions(+), 41 deletions(-) create mode 100644 home/kdeconnect.nix diff --git a/home/colors.nix b/home/colors.nix index 6f9f924..75de011 100644 --- a/home/colors.nix +++ b/home/colors.nix @@ -192,35 +192,48 @@ in #size = 24; }; gtk2.extraConfig = '' - style "custom-dark" { - bg[NORMAL] = "#${c.base00}" - bg[PRELIGHT] = "#${c.base02}" - bg[ACTIVE] = "#${c.base01}" - bg[SELECTED] = "#${c.base0D}" - bg[INSENSITIVE] = "#${c.base01}" - fg[NORMAL] = "#${c.base05}" - fg[PRELIGHT] = "#${c.base06}" - fg[ACTIVE] = "#${c.base07}" - fg[SELECTED] = "#${c.base07}" - fg[INSENSITIVE] = "#${c.base03}" - - base[NORMAL] = "#${c.base01}" - base[PRELIGHT] = "#${c.base02}" - base[ACTIVE] = "#${c.base0D}" - base[SELECTED] = "#${c.base0D}" - base[INSENSITIVE] = "#${c.base00}" - - text[NORMAL] = "#${c.base05}" - text[PRELIGHT] = "#${c.base06}" - text[ACTIVE] = "#${c.base07}" - text[SELECTED] = "#${c.base07}" - text[INSENSITIVE] = "#${c.base03}" - - } - - widget_class "*" style "custom-dark" - - gtk-application-prefer-dark-theme="true" +gtk-color-scheme = "fg_color:#${c.base05}\n\ +bg_color:#${c.base00}\n\ +text_color:#${c.base05}\n\ +base_color:#${c.base01}\n\ +selected_fg_color:#${c.base07}\n\ +selected_bg_color:#${c.base0D}\n\ +tooltip_fg_color:#${c.base07}\n\ +tooltip_bg_color:#${c.base02}\n\ +insensitive_fg_color:#${c.base03}\n\ +insensitive_bg_color:#${c.base01}" + + +style "custom-dark" { + bg[NORMAL] = "#${c.base00}" + bg[PRELIGHT] = "#${c.base02}" + bg[ACTIVE] = "#${c.base01}" + bg[SELECTED] = "#${c.base0D}" + bg[INSENSITIVE] = "#${c.base01}" + fg[NORMAL] = "#${c.base05}" + fg[PRELIGHT] = "#${c.base06}" + fg[ACTIVE] = "#${c.base07}" + fg[SELECTED] = "#${c.base07}" + fg[INSENSITIVE] = "#${c.base03}" + + base[NORMAL] = "#${c.base01}" + base[PRELIGHT] = "#${c.base02}" + base[ACTIVE] = "#${c.base0D}" + base[SELECTED] = "#${c.base0D}" + base[INSENSITIVE] = "#${c.base00}" + + text[NORMAL] = "#${c.base05}" + text[PRELIGHT] = "#${c.base06}" + text[ACTIVE] = "#${c.base07}" + text[SELECTED] = "#${c.base07}" + text[INSENSITIVE] = "#${c.base03}" +} + +class "**" style "custom-dark" +widget_class "**" style "custom-dark" + +gtk-application-prefer-dark-theme="true" + ''; gtk3.extraConfig = { @@ -250,9 +263,10 @@ in qt = { enable = true; - #platformTheme.name = "gtk"; - platformTheme.name = "gtk3"; + platformTheme.name = "gtk"; #tried gtk 3 but gives errors with mismatch. + #platformTheme.name = "adwaita"; style.name = "gtk2"; + #style.name = "adwaita-dark"; }; } diff --git a/home/kdeconnect.nix b/home/kdeconnect.nix new file mode 100644 index 0000000..91e8e04 --- /dev/null +++ b/home/kdeconnect.nix @@ -0,0 +1,12 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + services.kdeconnect = { + enable = true; + indicator = true; + }; +} diff --git a/home/niri.nix b/home/niri.nix index e3328c2..6a2cb25 100644 --- a/home/niri.nix +++ b/home/niri.nix @@ -1,6 +1,7 @@ { pkgs, config, + unstable, lib, ... }: @@ -48,6 +49,20 @@ let transform "normal" position x=2880 y=960 } + + //pvv demiurgen + output "Ancor Communications Inc MG248 G7LMQS010063" { + mode "1920x1080@60.000" + scale 1 + position x=1050 y=1080 + } + output "ASUSTek COMPUTER INC MG248 K2LMQS048969" { + mode "1920x1080@60.000" + scale 1 + position x=2970 y=1080 + } + + //desktop outputs. output "Dell Inc. DELL U2410 F525M06G123L" { @@ -231,7 +246,6 @@ let // See the binds section below for more spawn examples. // spawn-at-startup "alacritty" "-e" "fish" spawn-at-startup "foot" "--server" - spawn-at-startup "xwayland-satellite" spawn-at-startup "mako" spawn-at-startup "swww-daemon" spawn-at-startup "sh" "-c" "while true; do waybar; done" //disabled to a systemd service. in a while because it sometimes crashes. @@ -614,7 +628,9 @@ in { home.packages = with pkgs; [ + niri + # nirius needs to hit stable first wl-clipboard pass-wayland @@ -629,6 +645,8 @@ in xwayland-satellite xwayland + gtk3 + #bar applets and notifications waybar networkmanagerapplet @@ -661,6 +679,21 @@ in noto-fonts-color-emoji noto-fonts-monochrome-emoji + + + + # from archwiki recomended. + fuzzel + mako + waybar + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + alacritty + swaybg + xwayland-satellite + udiskie + + ]; # Drop the interpolated KDL into ~/.config/niri/config.kdl diff --git a/home/zed.nix b/home/zed.nix index 247246d..ae417e7 100644 --- a/home/zed.nix +++ b/home/zed.nix @@ -1,29 +1,39 @@ { pkgs, lib, + unstable, config, ... }: { + home.packages = with pkgs; [ + nodejs + copilot-language-server-fhs + github-copilot-cli + nixd + nodejs-slim + vscode-extensions.github.copilot + ]; programs.zed-editor = { enable = true; - package = pkgs.zed-editor-fhs; - + package = pkgs.unstable.zed-editor-fhs; + extraPackages = with pkgs; [ + nodejs copilot-language-server-fhs github-copilot-cli nixd nodejs-slim vscode-extensions.github.copilot ]; - extensions = [ "nix" "toml" "rust" "html" "yaml" "python" "make" "xml" "dockerfile" "vue" "latex" "csv" "rainbow csv" "snippets" "typst" "mermaid" "markdownlint" "markdown oxide" "java" "dart" "go" "c#" "json" "flask snippets" "python snippets" "flutter snippets"]; + extensions = [ "nix" "toml" "rust" "html" "yaml" "python" "make" "xml" "dockerfile" "vue" "latex" "csv" "rainbow csv" "snippets" "typst" "mermaid" "markdownlint" "markdown oxide" "java" "dart" "go" "c#" "json" "flask snippets" "python snippets" "flutter snippets" "tokyo night themes"]; userSettings = { theme = { mode = "system"; - dark = "One Dark"; - light = "One Light"; + dark = "Tokyo Night"; + light = "Tokyo Night Storm"; }; hour_format = "hour24"; node = { @@ -32,7 +42,7 @@ }; load_direnv = "shell_hook"; base_keymap = "VSCode"; - show_whitespaces = "all"; + show_whitespaces = "boundary"; }; }; } diff --git a/hosts/legolas/hardware-configuration.nix b/hosts/legolas/hardware-configuration.nix index cbf8166..59dd650 100644 --- a/hosts/legolas/hardware-configuration.nix +++ b/hosts/legolas/hardware-configuration.nix @@ -3,7 +3,8 @@ { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.kernelPackages = pkgs.linuxPackages_zen; + #boot.kernelPackages = pkgs.linuxPackages_zen; + boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelParams = [ "nvme_core.default_ps_max_latency_us=0" @@ -37,12 +38,36 @@ }; boot.kernel.sysctl = { - "vm.swappiness" = 10; + # "vm.swappiness" = 10; }; + systemd.targets.hibernate.enable = false; + #services.logind.lidSwitch = "suspend"; powerManagement.enable = true; + + + + # Disable hibernation + systemd.sleep = { + extraConfig = '' + AllowHibernation=no + AllowHybridSleep=no + AllowSuspendThenHibernate=no + ''; + }; + # Workaround for resume issues + systemd.services.systemd-suspend.environment = { + SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; + }; + # Disable PCIe wakeups + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled" + ''; + + + hardware.graphics = { enable = true; extraPackages = with pkgs; [ vpl-gpu-rt intel-media-sdk ]; diff --git a/modules/desktopApplications.nix b/modules/desktopApplications.nix index f41cc6d..00bb1dd 100644 --- a/modules/desktopApplications.nix +++ b/modules/desktopApplications.nix @@ -17,7 +17,7 @@ gparted libreoffice-fresh kdePackages.okular - zed-editor-fhs + #zed-editor-fhs inkscape krita sweethome3d.application