I have pkgs.base16-schemes installed but the theme is not applied to any of the programs. Even when I try having them installed via home-manager instead (in configuration.nix):
home-manager.users.myUsername =\n { config, ... }:\n {\n home = {\n stateVersion = \"25.11\";\n packages = [\n pkgs.neovim\n pkgs.fish\n pkgs.yazi\n ];\n };\n };My flake.nix:
\n {\n inputs = {\n home-manager = {\n url = \"github:nix-community/home-manager\";\n inputs.nixpkgs.follows = \"nixpkgs\";\n };\n stylix = {\n url = \"github:danth/stylix\";\n inputs.nixpkgs.follows = \"nixpkgs\";\n };\n nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n };\n \n outputs =\n { self, nixpkgs, ... }@inputs:\n {\n nixosConfigurations.NixOS-MBP = nixpkgs.lib.nixosSystem {\n specialArgs.flake-inputs = inputs;\n modules = [\n {\n home-manager.useGlobalPkgs = true;\n home-manager.useUserPackages = true;\n }\n inputs.home-manager.nixosModules.home-manager\n inputs.stylix.nixosModules.stylix\n ./configuration.nix\n ./hardware-configuration.nix\n ];\n };\n };\n }After lots of back and forth here, this seems to work:
\nconfiguration.nix:
\n# configuration.nix\n{ pkgs, flake-inputs, ... }: {\n imports = [\n ./hardware-configuration.nix\n flake-inputs.home-manager.nixosModules.home-manager\n flake-inputs.stylix.nixosModules.stylix\n ];\n\n stylix = {\n base16Scheme = \"${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml\";\n autoEnable = true;\n enable = true;\n };\n\n home-manager = {\n useGlobalPkgs = true;\n useUserPackages = true;\n # See next snippet\n users.myUsername = import ./home.nix;\n };\n\n # Any other config here\n}\nhome.nix:
\n# home.nix\n{ pkgs, ... }: {\n home = {\n # Remember not to touch this, no\n # it's not for updating, no it should\n # not be changed when updating\n stateVersion = \"25.11\";\n };\n\n stylix.targets.neovim.enable = true;\n programs.neovim.enable = true;\n\n # Any other config here\n}\nflake.nix:
\n# somewhere in flake.nix\nnixosConfigurations.DeviceNameHere = nixpkgs.lib.nixosSystem {\n specialArgs.flake-inputs = inputs;\n modules = [\n ./configuration.nix\n ];\n}\n-
|
Edit: Here's my whole config (minus hardware config) if that helps: nix config.zip I've done lots of looking up and reading the documentation multiple times but it seems to be missing something. The theme isn't applied to programs. I installed Stylix looking at the installation page, and the home manager module, both as flakes. It says "Installing Home Manager as a NixOS module is highly recommended" and "When Stylix is installed and enabled in a NixOS configuration, it will automatically set up its Home Manager modules if it detects that Home Manager is available". Looking at the configuration page, This is in my configuration.nix: stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
autoEnable = true;
enable = true;
};
programs = {
neovim.enable = true;
fish.enable = true;
yazi.enable = true;
}I have home-manager.users.myUsername =
{ config, ... }:
{
home = {
stateVersion = "25.11";
packages = [
pkgs.neovim
pkgs.fish
pkgs.yazi
];
};
};My flake.nix: {
inputs = {
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }@inputs:
{
nixosConfigurations.NixOS-MBP = nixpkgs.lib.nixosSystem {
specialArgs.flake-inputs = inputs;
modules = [
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
./configuration.nix
./hardware-configuration.nix
];
};
};
} |
Beta Was this translation helpful? Give feedback.
-
|
For most targets you need to use the |
Beta Was this translation helpful? Give feedback.
-
|
After lots of back and forth here, this seems to work: configuration.nix: home.nix: flake.nix: |
Beta Was this translation helpful? Give feedback.
After lots of back and forth here, this seems to work:
configuration.nix:
home.nix: