djanatyn / ssbm-nix

Nix expressions for Super Smash Bros. Melee players.
31 stars 15 forks source link

error: attribute 'slippi-netplay' missing (HomeManagerModule) #48

Open thelinuxpirate opened 8 months ago

thelinuxpirate commented 8 months ago

Im not too new to NixOS but I sure suck working with it; as of right now Im having issues using this flake with my home-maanger configuration. I used to get errors about "ssbm-nix" not being defined but I think I fixed that; Now I get slippi-netplay errors.

Here is my configuration:


# ~/.config/home-manager/flake.nix
{
  description = "Personal Home Manager Configuration; Created by: TheLinuxPirate";

  inputs = {
    # Specify the source of Nixpkgs, get Flake-Utils, & Home-Manager:
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Emacs-Overlay
    emacs-overlay = {
      url = "github:nix-community/emacs-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Rust-Overlay
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Spicetify
    spicetify-nix = {
      url = "github:the-argus/spicetify-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Gaming Tools
    nix-gaming = {
      url = "github:fufexan/nix-gaming";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Super Smash Brothers Melee Slippi via NixOS
    ssbm-nix = { 
      url = "github:djanatyn/ssbm-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
  self, 
  nixpkgs,
  flake-utils,
  home-manager,
  emacs-overlay,
  rust-overlay,
  spicetify-nix,
  nix-gaming,
  ssbm-nix,
  ... 
  }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
      specialArgs = {
        inherit emacs-overlay;
        inherit rust-overlay;
        inherit spicetify-nix;
        inherit nix-gaming;
        inherit ssbm-nix;
      }; in { 
      homeConfigurations.pinguino = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        extraSpecialArgs = specialArgs;
        modules = [
          ssbm-nix.homeManagerModule
          ./home.nix
           ({ pkgs, ... }: { # Rust
             nixpkgs.overlays = [ rust-overlay.overlays.default ];
             home.packages = [ pkgs.rust-bin.beta.latest.default ];
           })
        ];
      };
    };
}

# ~/.config/home-manager/home.nix
{  pkgs, ... }:
{
  imports = [ ./pingu/gaming.nix ];
}

# ~/.config/home-manager/pingu/gaming.nix
{  pkgs, nix-gaming, ssbm-nix, ... }:

{
  imports = [ inputs.ssbm-nix.homeManagerModule ];

  home.packages = [
    nix-gaming.packages.${pkgs.system}.wine-ge
    ssbm-nix.packages.${pkgs.system}.slippi-netplay
  ];

  ssbm = {
    gcc.oc-kmod.enable = true;
    slippi-launcher = {
      enable = true;
      isoPath = "~/System/ROMs/GC/SSBM.iso";
    };
  };
}

# The Error :(
error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'home-manager-generation'
         whose name attribute is located at /nix/store/9kf2q1cd2nqy7azvgvv3bvm3n4mrvmrb-source/pkgs/stdenv/generic/make-derivation.nix:300:7

       … while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'

         at /nix/store/9kf2q1cd2nqy7azvgvv3bvm3n4mrvmrb-source/pkgs/build-support/trivial-builders/default.nix:87:14:

           86|       enableParallelBuilding = true;
           87|       inherit buildCommand name;
             |              ^
           88|       passAsFile = [ "buildCommand" ]

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

       error: attribute 'slippi-netplay' missing

       at /nix/store/pp8myjah5yh2cbxrxirk577g3n552a0c-source/flake.nix:136:30:

          135|               netplayDolphinPath = mkOption {
          136|                 default = "${pkgs.slippi-netplay}";
             |                              ^
          137|                 type = types.str;```
Anomalocaridid commented 8 months ago

Try setting ssbm.overlay.enable = true in your system level settings (i.e. in flake.nix, configuration.nix, etc. instead of your home manager config)

thelinuxpirate commented 8 months ago

Hello, thanks for the response! I've updated the code to be like this now: Now I have a "list" error; did I mess the syntax somehow?

# Flake.nix
{
  description = "Personal Home Manager Configuration; Created by: TheLinuxPirate";

  inputs = {
    # Specify the source of Nixpkgs, get Flake-Utils, & Home-Manager:
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Other Imports...
    nix-gaming = {
      url = "github:fufexan/nix-gaming";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Super Smash Brothers Melee Slippi via NixOS
    ssbm-nix = { 
      url = "github:djanatyn/ssbm-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
  self, 
  nixpkgs,
  flake-utils,
  home-manager,
  nix-gaming,
  ssbm-nix,
  ... 
  }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
      overlays = [ ssbm-nix.overlay ]; # Specified Overlay
      specialArgs = {
        inherit nix-gaming;
        inherit ssbm-nix;
      }; in { 
      homeConfigurations.pinguino = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        extraSpecialArgs = specialArgs;
        modules = [
          ssbm-nix.homeManagerModule
           ({ pkgs, ... }: { # Rust
             nixpkgs.overlays = [ rust-overlay.overlays.default ];
             home.packages = [ pkgs.rust-bin.beta.latest.default ];
           })
          ./home.nix
          ./pingu/gaming.nix
        ];
      };
    };
}

# pingu/gaming.nix
{  pkgs, nix-gaming, ssbm-nix, ... }:

{
  imports = [ ssbm-nix.homeManagerModule ];

  home.packages = [
    nix-gaming.packages.${pkgs.system}.wine-ge
    ssbm-nix.packages.${pkgs.system}.slippi-netplay
  ];

  ssbm = {
    slippi-launcher = {
      enable = true;
      isoPath = "~/System/ROMs/GC/SSBM.iso";
    };
  };
}

# The Error:
error:
       … while evaluating a branch condition

         at /nix/store/9kf2q1cd2nqy7azvgvv3bvm3n4mrvmrb-source/lib/lists.nix:57:9:

           56|       fold' = n:
           57|         if n == len
             |         ^
           58|         then nul

       … while calling the 'length' builtin

         at /nix/store/9kf2q1cd2nqy7azvgvv3bvm3n4mrvmrb-source/lib/lists.nix:55:13:

           54|     let
           55|       len = length list;
             |             ^
           56|       fold' = n:

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

       error: failed to extract archive (truncated gzip input)