Open hermann-p opened 12 months ago
@hermann-p None of this looks immediately wrong to me. However there are some small things:
You are using legacyPackages.${system}
as your package set. Try doing pkgs = import nixpkgs { localSystem = {inherit system;}};
instead, might be a simple fix. If it works, let me know and I'll update the readme to say that legacyPackages isn't supported.
You could also try changing outputs = { nixpkgs, emacs-overlay, home-manager, ... }:
to outputs = { nixpkgs, emacs-overlay, home-manager, ... } @ inputs:
. This gives you inputs
as a reference to all of your flake inputs. Then you can add extraSpecialArgs
to your home configuration like so:
homeConfigurations."hermann" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = inputs;
};
This assures that you're telling home-manager's homeManagerConfiguration function to pass the spicetify-nix
flake input to all of your modules (home.nix
in this case).
If neither of these fix the problem, please upload your config (or a stripped-down version of it with the issue) to a repository so I can look at it further.
outputs = { nixpkgs, emacs-overlay, home-manager, ... } @ inputs: extraSpecialArgs = inputs;
This did it for me.
@the-argus Oops, bad comment, I had spicetify commented out. I needed to add the extra special args, too.
Glad it solved it. Leaving this open for now, until I find a good explanation and add some context about the issue to the readme.
Thanks for your time and the help :)
This is offtopic for the issue, but for anyone new who lands here:
You are using
legacyPackages.${system}
as your package set. Try doingpkgs = import nixpkgs { localSystem = {inherit system;}};
instead
This is completely backwards. nixpkgs.legacyPackages.${system}
is preferred when possible.
I'll update the readme to say that legacyPackages isn't supported.
There's no difference, other than with the import
you are unnecessarily instantiating nixpkgs and slowing down evaluation.
Leaving this open for now, until I find a good explanation
The error message indicates this already, this is infrec due to a missing module arg.
any updates on this? cant get it to work
any updates on this? cant get it to work
Read the comment above yours
In my home-manager on NixOS, I added the flake input and activated the program just as the readme suggested. When building the new home-manager generation, it will fail with
I disabled all optional extensions, so it must be something within the core module.
Home manager `flake.nix`
```nix { description = "Home Manager configuration"; inputs = { spicetify-nix.url = "github:the-argus/spicetify-nix"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; inputs.nixos.follows = "nixos"; }; }; outputs = { nixpkgs, emacs-overlay, home-manager, ... }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { homeConfigurations."hermann" = home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home.nix ]; }; }; } ```
My
home.nix
importsspicetify.nix
spicetify.nix
```nix { spicetify-nix, config, lib, pkgs, ... }: let spicePkgs = spicetify-nix.packages.${pkgs.system}.default; in { # allow spotify to be installed if you don't have unfree enabled already nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ]; # import the flake's module for your system imports = [ spicetify-nix.homeManagerModule ]; # configure spicetify :) programs.spicetify = { enable = true; theme = spicePkgs.themes.catppuccin-mocha; colorScheme = "flamingo"; enabledExtensions = with spicePkgs.extensions; [ ... ]; }; } ```