Comments (5)
Strange; I can't see any obvious issues.
from stylix.
You can see in th git repo that I changed the way the bars were defined. My syntax may have been a bit older.
But either way it made no difference.
from stylix.
Hi, I have encountered the same problem, and it also affects other programs such as hyprland, yazi, dunst, and btop.
EDIT: I believe I have identified the issue. I have Home Manager set up as standalone, and I only configured the theme, fonts, etc., on the host side but not on the HM side. I assumed I could set up the theme, fonts, and cursor on the host, and the specific programs would inherit these settings from HM.
Here's how I configured the NixOS host:
stylix = {
enable = true;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
image = /.../screenshots/a_cartoon_of_a_woman_with_flowers_in_her_hair.jpg;
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 16;
};
fonts = {
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
monospace = {
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
name = "FiraCode Nerd Font Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
Initially, I thought this was sufficient because of stylix.homeManagerIntegration.autoImport
and stylix.homeManagerIntegration.followSystem
, but I didn't get any themes or fonts applied to the programs managed by HM. Therefore, I added the following configuration in HM:
stylix.targets.waybar.enable = true;
stylix.targets.waybar.enableCenterBackColors = true;
stylix.targets.waybar.enableLeftBackColors = true;
stylix.targets.waybar.enableRightBackColors = true;
stylix.targets.dunst.enable = true;
stylix.targets.btop.enable = true;
stylix.targets.yazi.enable = true;
stylix.targets.vesktop.enable = true;
stylix.targets.fish.enable = true;
stylix.targets.wezterm.enable = true;
stylix.targets.rofi.enable = true;
stylix.targets.gtk.enable = true;
However, this still didn't work. I wondered if I also needed to set stylix.enable = true
; in HM. This resulted in a "stylix.image missing" error message, so I added my entire Stylix configuration from the NixOS host side to HM as well. This resolved the issue, but I suspect this approach might not be correct?
Also, this is my flake.nix
:
{
description = "My NixOS system configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
systems.url = "github:nix-systems/default-linux";
impermanence.url = "github:nix-community/impermanence";
stylix.url = "github:danth/stylix";
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
systems,
...
} @inputs: let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs (import systems) (
system:
import nixpkgs {
inherit system;
}
);
in {
inherit lib;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
overlays = import ./overlays {inherit inputs outputs;};
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
nixosConfigurations = {
# Main desktop
blackeye = lib.nixosSystem {
modules = [
inputs.stylix.nixosModules.stylix
./hosts/blackeye
];
specialArgs = {
inherit inputs outputs;
};
};
};
homeConfigurations = {
"jk@blackeye" = lib.homeManagerConfiguration {
modules = [
inputs.stylix.homeManagerModules.stylix
./home/jk/blackeye.nix
];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
};
};
}
from stylix.
Potentially related: #400 (comment)
from stylix.
Im having similar issues, but its especially weird because, in KDE (X11) mostly everything (also Home-Manager defined programs) gets nicely themed, and when i switch to a Hyprland Session, even the programs that have been themed before, dont get themed anymore. So i feel its a Wayland- or Hyprland-specific issue, because Home Manager actually is able to inherit the Stylix Settings from the Nix Configuration.
If you need any configs, logs, screenshots for further analysis, id be glad to help.
UPDATE: So apparently the Styling only works when using the Home Manager Module for the Program.
Now, waybar and rofi are getting styled.
But there are still some Programs, like Krusader, Dolphin and LF that are getting styled in KDE but not in Hyprland.
LF is also defined as a Home Manage module, so i cant really tell, where exactly the Problem is.
Edit: The following workaround seems to fix dark theme of specific apps, but it breaks the Plasma Desktop session (blackscreen), so i disabled it again:
Part of home.nix
gtk = {
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
qt = {
enable = true;
style.name = "adw-gtk3-dark";
platformTheme.name = "gtk3";
};
from stylix.
Related Issues (20)
- gtk: support theming at the system level HOT 3
- Compatibility issue with Plasma-manager HOT 8
- Zellij module has bad contrast HOT 2
- [BUG] Some or every QT apps will not open HOT 10
- foot + tmux + fish = frozen shell HOT 4
- kde: add Qt6 and non-KDE Qt theme support
- GDM Login photo support HOT 3
- idea: support a cross browser dark mode extension like dark-reader HOT 6
- Ability to stop Stylix from starting Hyprpaper service automatically HOT 5
- chromium: `programs.chromium.enable` now installs chromium HOT 2
- base16Scheme expected a set but found a string error HOT 10
- specialisations inherit the parents lib attrset HOT 2
- neovim: theming is incompatible with lazy.nvim HOT 2
- chromium: `stylix.targets.chromium` does not exist HOT 3
- VSCODE: add font size settings HOT 1
- Stylix theme won't apply to vscode after update HOT 4
- Suggest: Add support for changing icon theme from stylix HOT 2
- stylix: re-add `flake-utils` dependency HOT 2
- fish: `base16-fish` causes linux console (tty) to output `linux`
- fish: `base16-fish` script runs twice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylix.