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
91 lines
2.9 KiB
Nix
91 lines
2.9 KiB
Nix
lib: {
|
|
omarchyOptions = {
|
|
full_name = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Main user's full name";
|
|
};
|
|
email_address = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Main user's email address";
|
|
};
|
|
theme = lib.mkOption {
|
|
type = lib.types.either (lib.types.enum [
|
|
"tokyo-night"
|
|
"kanagawa"
|
|
"everforest"
|
|
"catppuccin"
|
|
"nord"
|
|
"gruvbox"
|
|
"gruvbox-light"
|
|
"custom"
|
|
]) lib.types.str;
|
|
default = "tokyo-night";
|
|
description = "Theme to use for Omarchy configuration";
|
|
};
|
|
customTheme = lib.mkOption {
|
|
type = lib.types.submodule {
|
|
options = {
|
|
wallpaperPath = lib.mkOption {
|
|
type = lib.types.path;
|
|
description = "Path to the wallpaper image to extract colors from";
|
|
};
|
|
variant = lib.mkOption {
|
|
type = lib.types.enum [ "light" "dark" ];
|
|
default = "dark";
|
|
description = "Color scheme variant to extract (light or dark)";
|
|
};
|
|
};
|
|
};
|
|
default = {};
|
|
description = "Custom theme configuration when theme is set to 'custom'";
|
|
};
|
|
primary_font = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "Liberation Sans 11";
|
|
};
|
|
vscode_settings = lib.mkOption {
|
|
type = lib.types.attrs;
|
|
default = {};
|
|
};
|
|
monitors = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
};
|
|
scale = lib.mkOption {
|
|
type = lib.types.int;
|
|
default = 2;
|
|
description = "Display scale factor (1 for 1x displays, 2 for 2x displays)";
|
|
};
|
|
quick_app_bindings = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
description = "A list of single keystroke key bindings to launch common apps.";
|
|
default = [
|
|
"SUPER, A, exec, $webapp=https://chatgpt.com"
|
|
"SUPER SHIFT, A, exec, $webapp=https://grok.com"
|
|
"SUPER, C, exec, $webapp=https://app.hey.com/calendar/weeks/"
|
|
"SUPER, E, exec, $webapp=https://app.hey.com"
|
|
"SUPER, Y, exec, $webapp=https://youtube.com/"
|
|
"SUPER SHIFT, G, exec, $webapp=https://web.whatsapp.com/"
|
|
"SUPER, X, exec, $webapp=https://x.com/"
|
|
"SUPER SHIFT, X, exec, $webapp=https://x.com/compose/post"
|
|
|
|
"SUPER, return, exec, $terminal"
|
|
"SUPER, F, exec, $fileManager"
|
|
"SUPER, B, exec, $browser"
|
|
"SUPER, M, exec, $music"
|
|
"SUPER, N, exec, $terminal -e nvim"
|
|
"SUPER, T, exec, $terminal -e btop"
|
|
"SUPER, D, exec, $terminal -e lazydocker"
|
|
"SUPER, G, exec, $messenger"
|
|
"SUPER, O, exec, obsidian -disable-gpu"
|
|
"SUPER, slash, exec, $passwordManager"
|
|
];
|
|
};
|
|
exclude_packages = lib.mkOption {
|
|
type = lib.types.listOf lib.types.package;
|
|
default = [];
|
|
description = "Packages to exclude from the default system packages";
|
|
};
|
|
};
|
|
}
|