Configure Stylix via Home Manager
I have installed Stylix on my System as the docs suggested. It seems to be working. I now want to Modify Stylix per User Via Home-Manager. How do that? When I try to home-manager switch
I get the following error:
error: The option `stylix' does not exist. Definition values:
- In `/nix/store/z3zfa264v3yi2d33c94bzcs77b7q5y4w-source/home.nix':
{
enable = true;
}
My system flake:
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
stylix.url = "github:danth/stylix";
};
outputs = { self, nixpkgs, stylix, ... }@inputs: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./configuration.nix
stylix.nixosModules.stylix
];
};
};
}
My system configuration.nix
{ config, libs, pkgs, inputs, ... }:
{
stylix.enable = true;
stylix.image = ./nix-wallpaper-dracula.png;
stylix.autoEnable = true;
stylix.targets.gtk.enable = true;
stylix.polarity = "light";
...
}
My home.nix
{ config, pkgs, inputs, nixvim, username, ... }:
{
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.stateVersion = "23.11";
programs.home-manager.enable = true;
stylix.enable = true;
...
}
My home flake.nix (Currently nothing to do with Stylix)
{
description = "Home Manager configuration of mirko";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {self, nixpkgs, home-manager, ... }@inputs:
let
username = "mirko";
hostname = "nixos";
system = "x86\_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."mirko" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit username; inherit hostname;
};
modules = [ ./home.nix ];
};
};
}
How am I supposed to Configure Stylix per User when i have it installed System wide. ?
Installing Stylix per user is not an option as I want to style the bootloader etc.