Spicetify-nix theme

Bonjour, je suis nouveau sur NixOS.
J’ai pour objectif de reproduire la conf de mon Archlinux sur Nix avant de migrer mon ordinateur principal sur cet OS.

Je pense avoir bien compris la configuration de packages, par contre la gestion des flakes m’est bien moins évidente…

Je bloque actuellement sur la mise en place du thème Comfy sur Spotify grâce à Spicetify.

J’ai regardé la doc de spicetify-nix, mais je n’arrive qu’à appliquer une palette de couleur custom et non un thème de mise en page…

Je précise aussi que j’utilise Stylix pour thèmer le reste de mon système, que j’ai désactivé pour spotify et spicetify.

Voilà mon flake.nix (n’hésitez pas à me conseiller sur sa construction, comme précisé, il a été fait de façon assez hasardeuse) :

{
  description = "NixOS system configuration flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-flatpak.url = "github:gmodena/nix-flatpak";
    spicetify-nix.url = "github:Gerg-L/spicetify-nix";
    nixcord.url = "github:kaylorben/nixcord";

    stylix = {
      url = "github:danth/stylix";

      inputs = {
        nixpkgs.follows = "nixpkgs";
        home-manager.follows = "home-manager";
      };
    };

  };

  outputs = inputs @ {
    nixpkgs,
    home-manager,
    nix-flatpak,
    spicetify-nix,
    stylix,
    ...
  }: let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
  in {
    nixosConfigurations.Sisyphe = nixpkgs.lib.nixosSystem {
      system = system;
      specialArgs = {inherit inputs;};
      modules = [
        ./configuration.nix
        nix-flatpak.nixosModules.nix-flatpak
        inputs.stylix.nixosModules.stylix
        home-manager.nixosModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.sharedModules = [
            inputs.spicetify-nix.homeManagerModules.default
            inputs.nixcord.homeModules.nixcord
          ];
        }
      ];
    };
  };
}

Et mon spotify.nix :

{
  config,
  lib,
  pkgs,
  spicetify-nix,
  ...
}:

{
  home-manager.users.AntoineD = {pkgs, ...}: {
    stylix.targets.spotify-player.enable = false;
    stylix.targets.spicetify.enable = false;

    programs.spicetify = {
      enable = true;
      colorScheme = "custom";
      customColorScheme = {
        text               = "689d6a";
        subtext            = "928374";
        main               = "282828";
        main-elevated      = "1d2021";
        main-transition    = "1d2021";
        highlight          = "32302f";
        highlight-elevated = "282828";
        sidebar            = "1d2021";
        player             = "1d2021";
        card               = "32302f";
        shadow             = "1d2021";
        selected-row       = "689d6a";
        button             = "689d6a";
        button-active      = "928374";
        button-disabled    = "32302f";
        tab-active         = "32302f";
        notification       = "FF0000";
        notification-error = "00FFFF";
        misc               = "0000FF";
        play-button        = "689d6a";
        play-button-active = "689d6a";
        progress-fg        = "689d6a";
        progress-bg        = "1d2021";
        heart              = "b16286";
        pagelink-active    = "689d6a";
        radio-btn-active   = "FFFF00";
      };
      
      theme = {
        name = "Comfy";
        src = pkgs.fetchFromGitHub {
          owner = "comfy-themes";
          repo = "spicetify";
          rev = "2c22f36";
          sha256 = "1f0raq621fs58wrvfqfbvrc91vi5czvdqm6pdw3w5a9ddawm0a1b";
        };
        
        # Additional theme options all set to defaults
        # the docs of the theme should say which of these 
        # if any you have to change
        injectCss = true;
        replaceColors = true;
        overwriteAssets = true;
        injectThemeJs = true;
        homeConfig = true;
        additonalCss = ".player-controls__buttons{--button-radius:8px !important;}";
        alwaysEnableDevTools = true;
      };
    };
  };
}

Merci aux personnes qui prendront le temps de m’aider :pray:

J’ai trouvé une solution à mon problème !
C’était dû au fait que les fichiers du thème Comfy ne sont pas à la racine du dépôt git, mais dans un sous dossier.

La solution a donc été de créer une variable du dépôt, pour pouvoir préciser le path :

[…]

}:
let
  repo = pkgs.fetchFromGitHub {
    owner = "comfy-themes";
    repo = "spicetify";
    rev = "2c22f36";
    sha256 = "1f0raq621fs58wrvfqfbvrc91vi5czvdqm6pdw3w5a9ddawm0a1b";
  };
in
{

[…]

theme = {
        name = "Comfy";
        src = "${repo}/Comfy";

[…]