From abb8f032429cdb0d31e982f83ca9e18750f7178b Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Fri, 29 Aug 2025 02:23:00 +0200 Subject: [PATCH] aasdafa --- flake.nix | 6 +- home/colors.nix | 218 ++++++++++++++++++----- home/fcitx5.nix | 40 +++++ home/foot.nix | 4 +- home/fuzzel.nix | 2 +- home/gunalx.nix | 5 +- home/sops.nix | 4 +- home/sshconfig.nix | 3 +- home/swww.nix | 8 + home/wallpapers.nix | 2 +- home/wlogout.nix | 2 +- hosts/legolas/configuration.nix | 12 +- hosts/legolas/hardware-configuration.nix | 8 +- modules/bluetooth.nix | 23 +++ modules/desktopApplications.nix | 80 +++++++++ modules/develPackages.nix | 62 +++++++ modules/develpackages.nix | 23 --- modules/gunalx.nix | 3 +- treefmt.toml | 3 + 19 files changed, 406 insertions(+), 102 deletions(-) create mode 100644 home/fcitx5.nix create mode 100644 home/swww.nix create mode 100644 modules/bluetooth.nix create mode 100644 modules/desktopApplications.nix create mode 100644 modules/develPackages.nix delete mode 100644 modules/develpackages.nix create mode 100644 treefmt.toml diff --git a/flake.nix b/flake.nix index d459f64..a1033af 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,8 @@ system = "x86_64-linux"; in { + #formatter + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt; # legolas nixosConfigurations.legolas = nixpkgs.lib.nixosSystem { @@ -57,9 +59,7 @@ home-manager.users.gunalx = import ./home/gunalx.nix; home-manager.backupFileExtension = "bac"; home-manager.extraSpecialArgs = { inherit nix-colors inputs; }; - home-manager.sharedModules = [ - inputs.sops-nix.homeManagerModules.sops - ]; + home-manager.sharedModules = [ inputs.sops-nix.homeManagerModules.sops ]; } sops-nix.nixosModules.sops diff --git a/home/colors.nix b/home/colors.nix index 6999235..7e3d9f5 100644 --- a/home/colors.nix +++ b/home/colors.nix @@ -7,58 +7,172 @@ let nix-colors-lib = nix-colors.lib.contrib { inherit pkgs; }; + c = config.colorScheme.palette; # Access palette colors - background = "010C09"; - foreground = "FFFFFF"; - offWhite = "F0FFF8"; - teal = "60C89A"; - red = "E64553"; - blue = "58B5E0"; - green = "79E05B"; - purple = "6B5BDC"; - magenta = "80D1A0"; - cyan = "5FE2C5"; - yellow = "F5D24D"; - orange = "FF8800"; - pink = "FF4EC9"; - grey = "888B8E"; - lightGrey = "F3FCF7"; - darkTeal = "154E44"; - lighterTeal = "2C7A6A"; - lightTeal = "B0E8DA"; + # Generate comprehensive CSS overrides using your color palette + gtkColorOverrides = '' + /* UI Colors - Main variables */ + @define-color accent_bg_color #${c.base0D}; + @define-color accent_fg_color #${c.base07}; + @define-color accent_color #${c.base0D}; + @define-color destructive_bg_color #${c.base08}; + @define-color destructive_fg_color #${c.base07}; + @define-color destructive_color #${c.base08}; + @define-color success_bg_color #${c.base0B}; + @define-color success_fg_color #${c.base07}; + @define-color success_color #${c.base0B}; + @define-color warning_bg_color #${c.base0A}; + @define-color warning_fg_color #${c.base00}; + @define-color warning_color #${c.base0A}; + @define-color error_bg_color #${c.base08}; + @define-color error_fg_color #${c.base07}; + @define-color error_color #${c.base08}; + + /* Window Colors */ + @define-color window_bg_color #${c.base00}; + @define-color window_fg_color #${c.base05}; + + /* View Colors */ + @define-color view_bg_color #${c.base00}; + @define-color view_fg_color #${c.base05}; + + /* Header Bar Colors */ + @define-color headerbar_bg_color #${c.base01}; + @define-color headerbar_fg_color #${c.base05}; + @define-color headerbar_border_color #${c.base03}; + @define-color headerbar_backdrop_color #${c.base00}; + @define-color headerbar_shade_color rgba(0, 0, 0, 0.12); + @define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.12); + + /* Sidebar Colors */ + @define-color sidebar_bg_color #${c.base01}; + @define-color sidebar_fg_color #${c.base05}; + @define-color sidebar_backdrop_color #${c.base00}; + @define-color sidebar_border_color rgba(0, 0, 0, 0.07); + @define-color sidebar_shade_color rgba(0, 0, 0, 0.07); + + /* Card Colors */ + @define-color card_bg_color #${c.base01}; + @define-color card_fg_color #${c.base05}; + @define-color card_shade_color rgba(0, 0, 0, 0.07); + + /* Dialog Colors */ + @define-color dialog_bg_color #${c.base01}; + @define-color dialog_fg_color #${c.base05}; + + /* Popover Colors */ + @define-color popover_bg_color #${c.base01}; + @define-color popover_fg_color #${c.base05}; + @define-color popover_shade_color rgba(0, 0, 0, 0.07); + + /* Miscellaneous Colors */ + @define-color shade_color rgba(0, 0, 0, 0.07); + @define-color scrollbar_outline_color #${c.base07}; + + /* Palette Colors */ + @define-color blue_1 #99c1f1; + @define-color blue_2 #62a0ea; + @define-color blue_3 #3584e4; + @define-color blue_4 #1c71d8; + @define-color blue_5 #1a5fb4; + @define-color green_1 #8ff0a4; + @define-color green_2 #57e389; + @define-color green_3 #33d17a; + @define-color green_4 #2ec27e; + @define-color green_5 #26a269; + @define-color yellow_1 #f9f06b; + @define-color yellow_2 #f8e45c; + @define-color yellow_3 #f6d32d; + @define-color yellow_4 #f5c211; + @define-color yellow_5 #e5a50a; + @define-color orange_1 #ffbe6f; + @define-color orange_2 #ffa348; + @define-color orange_3 #ff7800; + @define-color orange_4 #e66100; + @define-color orange_5 #c64600; + @define-color red_1 #f66151; + @define-color red_2 #ed333b; + @define-color red_3 #e01b24; + @define-color red_4 #c01c28; + @define-color red_5 #a51d2d; + @define-color purple_1 #dc8add; + @define-color purple_2 #c061cb; + @define-color purple_3 #9141ac; + @define-color purple_4 #813d9c; + @define-color purple_5 #613583; + @define-color brown_1 #cdab8f; + @define-color brown_2 #b5835a; + @define-color brown_3 #986a44; + @define-color brown_4 #865e3c; + @define-color brown_5 #63452c; + @define-color light_1 #ffffff; + @define-color light_2 #f6f5f4; + @define-color light_3 #deddda; + @define-color light_4 #c0bfbc; + @define-color light_5 #9a9996; + @define-color dark_1 #77767b; + @define-color dark_2 #5e5c64; + @define-color dark_3 #3d3846; + @define-color dark_4 #241f31; + @define-color dark_5 #000000; + + /* Compatibility Colors */ + @define-color theme_bg_color #${c.base00}; + @define-color theme_fg_color #${c.base05}; + @define-color theme_base_color #${c.base00}; + @define-color theme_text_color #${c.base05}; + @define-color theme_selected_bg_color #${c.base0D}; + @define-color theme_selected_fg_color #${c.base07}; + @define-color insensitive_bg_color #${c.base01}; + @define-color insensitive_fg_color #${c.base03}; + @define-color insensitive_base_color #${c.base00}; + @define-color borders rgba(0, 0, 0, 0.15); + @define-color theme_unfocused_bg_color #${c.base00}; + @define-color theme_unfocused_fg_color #${c.base05}; + @define-color theme_unfocused_base_color #${c.base00}; + @define-color theme_unfocused_text_color #${c.base05}; + @define-color theme_unfocused_selected_bg_color #${c.base0D}; + @define-color theme_unfocused_selected_fg_color #${c.base07}; + @define-color unfocused_insensitive_color #${c.base01}; + @define-color unfocused_borders rgba(0, 0, 0, 0.15); + + /* Standard GTK Colors */ + @define-color bg_color #${c.base00}; + @define-color fg_color #${c.base05}; + @define-color base_color #${c.base00}; + @define-color text_color #${c.base05}; + @define-color selected_bg_color #${c.base0D}; + @define-color selected_fg_color #${c.base07}; + @define-color tooltip_bg_color #${c.base01}; + @define-color tooltip_fg_color #${c.base05}; + ''; in { - imports = [ - nix-colors.homeManagerModules.default - ]; + imports = [ nix-colors.homeManagerModules.default ]; - # colorScheme = nix-colors-lib.colorSchemeFromPicture { - # path = ./assets/evergarden-telescope.jpg; - # variant = "dark"; - # }; colorScheme = { slug = "teal-green-dark"; name = "Teal Green Dark"; author = "Auto‐generated"; palette = { - # Base16 Teal‐Green Dark Theme - base00 = "0f1f1c"; # Default background - base01 = "143028"; # Lighter background (status bars) - base02 = "1e3b34"; # Selection background - base03 = "28514b"; # Comments, secondary content - base04 = "4a7b70"; # Dark foreground (status bars) - base05 = "d4efe0"; # Default foreground - base06 = "e4f8f2"; # Light foreground - base07 = "fafdfb"; # Lightest background - base08 = "63d1be"; # Variables, markup link text - base09 = "3dc28f"; # Integers, constants - base0A = "a2e096"; # Classes, search highlight - base0B = "8ce45a"; # Strings, inserted - base0C = "4cd7e5"; # Support, escape characters - base0D = "2e97d5"; # Functions, headings - base0E = "df6fad"; # Keywords, selectors - base0F = "e5d97f"; # Deprecated tags + # Base16 Teal‐Green Dark Theme - Enhanced Teal Version + base00 = "0c1f1d"; # Default background - deeper teal base + base01 = "12302d"; # Lighter background (status bars) + base02 = "1c3b38"; # Selection background + base03 = "26514d"; # Comments, secondary content + base04 = "447b76"; # Dark foreground (status bars) + base05 = "c4e5e0"; # Default foreground + base06 = "d4f0ed"; # Light foreground + base07 = "f0fbfa"; # Lightest background + base08 = "5fcac0"; # Variables, markup link text - teal accent + base09 = "40bfa5"; # Integers, constants - teal-green + base0A = "60d5b0"; # Classes, search highlight - bright teal + base0B = "40c0a0"; # Strings, inserted - true teal (less green) + base0C = "30d0c0"; # Support, escape characters - cyan-teal + base0D = "2aa198"; # Functions, headings - classic teal + base0E = "3cb4ac"; # Keywords, selectors - teal-blue + base0F = "70d0c0"; # Deprecated tags - light teal }; }; @@ -68,17 +182,25 @@ in name = "Adwaita-dark"; package = pkgs.gnome-themes-extra; }; + # Nudge towards dark theme + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + # Inject comprehensive color overrides for GTK 3 + gtk3.extraCss = gtkColorOverrides; + # Inject comprehensive color overrides for GTK 4 + gtk4.extraCss = gtkColorOverrides; }; qt = { enable = true; - platformTheme.name = "adwaita"; - style.name = "adwaita-dark"; + platformTheme.name = "gtk"; + style.name = "gtk"; }; - # Ensure the Adwaita GTK theme is installed so wlogout can load gtk.css - home.packages = with pkgs; [ - gnome-themes-extra - ]; + home.packages = with pkgs; [ gnome-themes-extra ]; } diff --git a/home/fcitx5.nix b/home/fcitx5.nix new file mode 100644 index 0000000..08e6b98 --- /dev/null +++ b/home/fcitx5.nix @@ -0,0 +1,40 @@ +{ pkgs, lib, ... }: + +{ + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + + fcitx5 = { + waylandFrontend = true; + addons = with pkgs; [ + fcitx5-gtk + fcitx5-mozc + catppuccin-fcitx5 + ]; + + themes = { + catppuccin = { + highlightImage = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/highlight.svg"; + panelImage = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/panel.svg"; + theme = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/theme.conf"; + }; + }; + + settings = { + addons.classicui.globalSection = { + Theme = "catppuccin"; + }; + globalOptions."Global" = { + TriggerKey = "Control+space"; + }; + inputMethod."Default" = { + Enabled = "xkb:us::eng,xkb:no::nob,xkb:jp::jpn,mozc"; + }; + }; + }; + }; + + systemd.user.services.fcitx5-daemon.Service.ExecStart = + lib.mkForce "${pkgs.fcitx5-with-addons}/bin/fcitx5"; +} diff --git a/home/foot.nix b/home/foot.nix index 53c369c..e0d10fb 100644 --- a/home/foot.nix +++ b/home/foot.nix @@ -5,9 +5,7 @@ ... }: { - home.packages = with pkgs; [ - foot - ]; + home.packages = with pkgs; [ foot ]; programs.foot.enable = true; programs.foot.settings = { diff --git a/home/fuzzel.nix b/home/fuzzel.nix index 159fd88..067bf01 100644 --- a/home/fuzzel.nix +++ b/home/fuzzel.nix @@ -9,8 +9,8 @@ let palette = config.colorScheme.palette; hex = colour: lib.removePrefix "#" colour; -in +in { programs.fuzzel = { enable = true; diff --git a/home/gunalx.nix b/home/gunalx.nix index a8bf0f0..624de4d 100644 --- a/home/gunalx.nix +++ b/home/gunalx.nix @@ -18,13 +18,14 @@ ./waybar.nix ./wlogout.nix ./niri.nix - #./wallpapers.nix + ./wallpapers.nix + ./swww.nix #applications ./mako.nix ./foot.nix ./zed.nix - #./fcitx5.nix + ./fcitx5.nix #secrets inputs.sops-nix.homeManagerModules.sops diff --git a/home/sops.nix b/home/sops.nix index 62b6589..5ad5847 100644 --- a/home/sops.nix +++ b/home/sops.nix @@ -3,9 +3,7 @@ sops = { defaultSopsFile = ../secrets/secrets.yaml; validateSopsFiles = false; - age.sshKeyPaths = [ - "/home/gunalx/.ssh/nixos" - ]; + age.sshKeyPaths = [ "/home/gunalx/.ssh/nixos" ]; age.keyFile = "/home/gunalx/.config/sops/age/key.txt"; age.generateKey = true; # This is the actual specification of the secrets. diff --git a/home/sshconfig.nix b/home/sshconfig.nix index 420942f..7d06f52 100644 --- a/home/sshconfig.nix +++ b/home/sshconfig.nix @@ -5,8 +5,7 @@ ... }: { - imports = [ - ]; + imports = [ ]; home.packages = with pkgs; [ openssh diff --git a/home/swww.nix b/home/swww.nix new file mode 100644 index 0000000..1479e69 --- /dev/null +++ b/home/swww.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +let + palette = config.colorscheme.palette; +in +{ + services.swww.enable = true; +} diff --git a/home/wallpapers.nix b/home/wallpapers.nix index 49d98da..fcc1636 100644 --- a/home/wallpapers.nix +++ b/home/wallpapers.nix @@ -2,7 +2,7 @@ let # Path to your source folder of wallpapers - wallpaperSrc = ./wallpapers; + wallpaperSrc = ./Wallpapers; # Read all file names in that directory names = lib.attrNames (builtins.readDir wallpaperSrc); diff --git a/home/wlogout.nix b/home/wlogout.nix index 4036b28..d9000c9 100644 --- a/home/wlogout.nix +++ b/home/wlogout.nix @@ -19,8 +19,8 @@ let # Path to the wleave-provided icons iconsDir = "${pkgs.wleave}/share/wleave/icons"; -in +in { programs.wlogout = { enable = true; diff --git a/hosts/legolas/configuration.nix b/hosts/legolas/configuration.nix index 3e32459..1177bf8 100644 --- a/hosts/legolas/configuration.nix +++ b/hosts/legolas/configuration.nix @@ -24,6 +24,10 @@ ../../modules/pam.nix ../../modules/tailscale.nix ../../modules/podman.nix + ../../modules/desktopApplications.nix + ../../modules/develPackages.nix + ../../modules/bluetooth.nix + ]; networking.hostName = "legolas"; @@ -58,14 +62,6 @@ nixfmt-rfc-style nixfmt-tree - distrobox - distrobox-tui - boxbuddy - - gcc - cargo - rustup - cmake ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/hosts/legolas/hardware-configuration.nix b/hosts/legolas/hardware-configuration.nix index 8892207..bd98587 100644 --- a/hosts/legolas/hardware-configuration.nix +++ b/hosts/legolas/hardware-configuration.nix @@ -10,9 +10,7 @@ }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" @@ -32,8 +30,8 @@ boot.initrd.luks.devices = { "luks_secure" = { device = "/dev/disk/by-uuid/c21c8089-29a7-4266-a8a6-6e80ccca167c"; - preLVM = true; - allowDiscards = true; + #preLVM = true; + #allowDiscards = true; crypttabExtraOpts = [ "tpm2-device=auto" "tpm2-measure-pcr=yes" diff --git a/modules/bluetooth.nix b/modules/bluetooth.nix new file mode 100644 index 0000000..5fd6b05 --- /dev/null +++ b/modules/bluetooth.nix @@ -0,0 +1,23 @@ +{ + config, + pkgs, + lib, + ... +}: + +{ + imports = [ ]; + + environment.systemPackages = with pkgs; [ bluez ]; + + hardware.bluetooth.enable = lib.mkDefault true; + hardware.bluetooth.settings = lib.mkDefault { + General = { + Enable = "Source,Sink,Media,Socket"; + Experimental = true; + }; + }; + + services.blueman.enable = lib.mkDefault true; + +} diff --git a/modules/desktopApplications.nix b/modules/desktopApplications.nix new file mode 100644 index 0000000..9f52f1f --- /dev/null +++ b/modules/desktopApplications.nix @@ -0,0 +1,80 @@ +{ + config, + pkgs, + lib, + ... +}: + +{ + environment.systemPackages = with pkgs; [ + element-desktop + discord + firefox + nautilus + obs-studio + gimp + feh + gparted + libreoffice-fresh + kdePackages.okular + zed-editor + inkscape + krita + sweethome3d.application + audacity + bitwarden + zettlr # notes + logseq + pandoc + typst + texliveFull + prusa-slicer + freecad-wayland + openscad-unstable + kicad-unstable + kicadAddons.kikit + kicadAddons.kikit-library + easyeffects + musescore + mpv + spotify + spotify-tray + rclone + distrobox + boxbuddy + dbeaver-bin + sqlite + sqlitebrowser + postman + mitmproxy + wireshark + gdb + calibre + anki + bibletime + aerc + thunderbird + #eddie # old dotnet + steam + prismlauncher + protonplus + qbittorrent + kdePackages.filelight + kdePackages.kdeconnect-kde # could use valent instead. + solaar + cheese + ffmpeg + openvpn + wireguard-tools + fontforge + piper-tts + yt-dlp + tealdeer + clipboard-jh + + noto-fonts-cjk-sans + + ]; + + programs.dconf.enable = lib.mkDefault true; +} diff --git a/modules/develPackages.nix b/modules/develPackages.nix new file mode 100644 index 0000000..a59728b --- /dev/null +++ b/modules/develPackages.nix @@ -0,0 +1,62 @@ +{ + config, + pkgs, + lib, + ... +}: + +{ + environment.systemPackages = with pkgs; [ + gdb + libgcc + gcc + gccStdenv + gnumake + libcxx + libclc + libcap + libcutl + cmake + autoconf + i2pd-tools + xorg-autoconf + automake + autobuild + libtool + pkgconf + libpkgconf + pkg-config + valgrind + fontconfig + + rustup + rustfmt + treefmt + + python3Full + python3Packages.numpy + python3Packages.sympy + python3Packages.scipy + python3Packages.matplotlib + python3Packages.requests + python3Packages.pandas + python3Packages.scikit-learn + python3Packages.huggingface-hub + python3Packages.flask + python3Packages.gunicorn + python3Packages.torch + python3Packages.opencv-python + python3Packages.pillow + python3Packages.keras + python3Packages.tqdm + + #dotnet-sdk_8 + #dotnet-sdk_9 + #dotnet-sdk_10 + #dotnet-aspnetcore + #dotnet-ef + + ]; + + programs.dconf.enable = lib.mkDefault true; +} diff --git a/modules/develpackages.nix b/modules/develpackages.nix deleted file mode 100644 index c0ef140..0000000 --- a/modules/develpackages.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - imports = [ ]; - - services.displayManager = { - enable = true; - sessionPackages = with pkgs; [ niri ]; - defaultSession = "niri"; - sddm = { - enable = true; - autoNumlock = true; - enableHidpi = true; - }; - - }; - -} diff --git a/modules/gunalx.nix b/modules/gunalx.nix index 5d0a9d7..dbaa1a1 100644 --- a/modules/gunalx.nix +++ b/modules/gunalx.nix @@ -15,7 +15,6 @@ "networking" "podman" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - ]; + packages = with pkgs; [ ]; }; } diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..71497ab --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,3 @@ +[formatter.nix] +command = "nixfmt" +includes = ["*.nix"]