Misterio77 / nix-colors

Modules and schemes to make theming with Nix awesome.
GNU General Public License v3.0
465 stars 38 forks source link

Error: The option `colorScheme' does not exist #54

Open VirgilSurin opened 3 months ago

VirgilSurin commented 3 months ago

Hello, I am creating a new issue but it is similar to the closed #35 . I have the exact same error as described. Unfortunately I went through the fix for #35 but did not fixed mine.

I am running home-manager in a standalone. Here is my flake.nix for home-manager :

{
  description = "Home Manager configuration of virgil";

  inputs = {
    # Specify the source of Home Manager and Nixpkgs.
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-colors.url = "github:misterio77/nix-colors";

  };

  outputs = { nixpkgs, home-manager, ... }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      homeConfigurations."virgil" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        extraSpecialArgs = { inherit inputs; };

        modules = [ ./home.nix ];
      };
    };
}

Here is the relevant part of my home.nix :

{ pkgs, inputs, ... }:

{
   import = [
      inputs.nix-colors.homeManagerModules.colorscheme
     ./alacritty.nix
   ];

  colorScheme = inputs.nix-colors.colorSchemes.onedark;

Here is the error I get when running home-manager switch

╰─>$ home-manager switch
error:
       … while evaluating a branch condition

         at /nix/store/n2g5cqwv8qf5p6vjxny6pg3blbdij12k-source/lib/lists.nix:125:9:

          124|       fold' = n:
          125|         if n == len
             |         ^
          126|         then nul

       … while calling the 'length' builtin

         at /nix/store/n2g5cqwv8qf5p6vjxny6pg3blbdij12k-source/lib/lists.nix:123:13:

          122|     let
          123|       len = length list;
             |             ^
          124|       fold' = n:

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `colorScheme' does not exist. Definition values:
       - In `/nix/store/qp2259lwhq39p4pq51qilq6b0s0mnpnj-source/home.nix':
           {
             author = "Lalit Magant (http://github.com/tilal6991)";
             name = "OneDark";
             palette = {
               base00 = "282c34";
           ...

I have double checked and I cannot figure out why it do not find the option. I ran $ nix eval github:misterio77/nix-colors#homeManagerModules And here is the output :

{ colorScheme = { imports = [ /nix/store/qdbkj8di083m9cj11zylzkzzqwn9wsaz-source/module/colorscheme.nix ]; }; colorscheme = «repeated»; default = «repeated»; }

Clearly colorScheme is there and exists. If you have any insight.

Noname672 commented 2 months ago

It is because you wrote import instead of imports. You probably found this out already but I should mention it just in case.