forked from Shinonome/omarchy-nix
b51d8f632b
* Add custom theme support with wallpaper-based color extraction
- Extended theme option to accept "custom" value
- Added customTheme configuration with wallpaperPath and variant options
- Integrated nix-colors colorSchemeFromPicture for dynamic color generation
- Updated wallpaper selection to handle custom paths
- Added VSCode theme fallback for custom color schemes
- Fixed nix-colors contrib function call (requires pkgs argument)
- Maintains full backward compatibility with existing themes
Users can now generate themes from their own wallpapers:
omarchy = {
theme = "custom";
customTheme = {
wallpaperPath = ./wallpapers/my-image.png;
variant = "dark"; # or "light"
};
};
* Fix: Screen sharing broken due to Qt library version mismatch
File changed: modules/nixos/hyprland.nix
Problem:
The omarchy-nix configuration was using xdg-desktop-portal-hyprland from the hyprland flake input, which had a Qt library version mismatch (6.9.1 vs 6.9.0). This caused the
hyprland-share-picker to crash with "Cannot mix incompatible Qt library" errors, preventing screen sharing from working.
Solution:
Changed the portalPackage from the hyprland flake version to the stable nixpkgs version:
- portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
+ portalPackage = pkgs.xdg-desktop-portal-hyprland; # Use stable nixpkgs version to fix Qt version mismatch
Why this works:
- The stable nixpkgs version of xdg-desktop-portal-hyprland has consistent Qt library versions
- This matches the working configuration used on other NixOS Hyprland setups
- Maintains all screen sharing functionality while avoiding the Qt version conflict
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
inputs: {
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
packages = import ../packages.nix {inherit pkgs lib; exclude_packages = config.omarchy.exclude_packages;};
|
|
|
|
themes = import ../themes.nix;
|
|
|
|
# Handle theme selection - either predefined or custom
|
|
selectedTheme = if config.omarchy.theme == "custom"
|
|
then themes.custom
|
|
else themes.${config.omarchy.theme};
|
|
|
|
# Generate color scheme - either from predefined or from wallpaper
|
|
generatedColorScheme = if config.omarchy.theme == "custom"
|
|
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
|
path = config.omarchy.customTheme.wallpaperPath;
|
|
variant = config.omarchy.customTheme.variant;
|
|
}
|
|
else null;
|
|
in {
|
|
imports = [
|
|
(import ./hyprland.nix inputs)
|
|
(import ./hyprlock.nix inputs)
|
|
(import ./hyprpaper.nix)
|
|
(import ./hypridle.nix)
|
|
(import ./ghostty.nix)
|
|
(import ./btop.nix)
|
|
(import ./direnv.nix)
|
|
(import ./git.nix)
|
|
(import ./mako.nix)
|
|
(import ./starship.nix)
|
|
(import ./vscode.nix)
|
|
(import ./waybar.nix inputs)
|
|
(import ./wofi.nix)
|
|
(import ./zoxide.nix)
|
|
(import ./zsh.nix)
|
|
];
|
|
|
|
home.file = {
|
|
".local/share/omarchy/bin" = {
|
|
source = ../../bin;
|
|
recursive = true;
|
|
};
|
|
};
|
|
home.packages = packages.homePackages;
|
|
|
|
colorScheme = if config.omarchy.theme == "custom"
|
|
then generatedColorScheme
|
|
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
|
|
|
gtk = {
|
|
enable = true;
|
|
theme = {
|
|
name = "Adwaita-dark";
|
|
package = pkgs.gnome-themes-extra;
|
|
};
|
|
};
|
|
|
|
# TODO: Add an actual nvim config
|
|
programs.neovim.enable = true;
|
|
}
|