#Flake inputs

1 messages · Page 1 of 1 (latest)

gleaming cave
#

home.nix

{ config, pkgs, inputs, ... }:

{
  imports = [
    ./software
  ];

  # User info
  home.username = "thenat";
  home.homeDirectory = "/home/thenat";

  home.stateVersion = "23.11";

  home.file = {
    ".config/swayidle/config".text = ''
      timeout 240 swaylock
      before-sleep swaylock

      timeout 360 'hyprctl dispatch dpms off eDP-1' resume 'hyprctl dispatch dpms on eDP-1'
    '';
  };

  home.sessionVariables = {
    EDITOR = "hx";
  };

  programs.home-manager.enable = true;
}

default.nix

{
   config, 
   pkgs,
   inputs,
   ... 
}: {
  imports = [
    ./gtk.nix
    ./anyrun.nix
  ];

  home.packages = with pkgs; [
    # paquetes
  ];
}

anyrun.nix

{ 
  pkgs, 
  inputs,
  config,
  ... 
}: {
  import = [
    inputs.anyrun.homeManagerModules.default
  ];

  programs.anyrun.enable = true;
}
#

@plain prawn Estas por ahi? Nesecito una mano jaja

#

Me da un error con que inputs no esta definido

plain prawn
#

Ceno y lo miro

gleaming cave
#

Ok

plain prawn
gleaming cave
#

Es largo el mensaje

plain prawn
#

Metelo en archivo y pasalo xd

gleaming cave
plain prawn
#

Dame 50min, sorry jaja

gleaming cave
#

Tambien tengo esto en flake.nix, si acaso

{
  description = "Home Manager configuration of thenat";

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

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

    anyrun = {
      url = "github:Kirottu/anyrun";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

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

        modules = [ ./home.nix ];
      };
    };
}
plain prawn
#

Bueno ahora sí estoy :3. Ahí reviso todo

gleaming cave
#
homeConfigurations.thenat = home-manager.lib.homeManagerConfiguration {
  inherit pkgs;

        # Specify your home configuration modules here, for example,
  # the path to your home.nix.
  modules = [ ./home.nix anyrun.packages.${system}.anyrun ];

  # Optionally use extraSpecialArgs
  # to pass through arguments to home.nix
};
#

Eso soluciona pero me da otro error

#
error: The option `CARGO_BUILD_INCREMENTAL' does not exist. Definition values:
       - In `<unknown-file>': "false"
plain prawn
gleaming cave
#

Me encontre esto con chatGPT

#

It seems like you’re trying to use the cargo_build_incremental option in your Cargo configuration, but you’re encountering an error saying that the option doesn’t exist.

Based on the search results you provided, it looks like you may have accidentally misspelled the option name. The correct option name is actually incremental, which is used to enable or disable incremental compilation.

plain prawn
#

Estoy mirando a ver que puede ser...

#

No, chatgpt no por dios jaja

plain prawn
gleaming cave
#

No le movi nada

plain prawn
#

En vez de hacer el import... Probá instalar con package = pkgs.anyrun.package.${pkgs.system}.default o algo así

gleaming cave
#
{ 
  pkgs, 
  config,
  ... 
}: {
  package = pkgs.anyrun.package.${pkgs.system}.default;
}

Algo asi?

#

No tengo home-manager como modulo de nixos, por si acaso ayuda

plain prawn
#

Si, probá jaja

gleaming cave
#

Same

plain prawn
# gleaming cave Eso

Te pregunto porque no me brindaste mucha info es complicado...

  • Actualizaste el flake cuando agregaste anyrun?
  • modules = [ ./home.nix anyrun.packages.${system}.anyrun ]; esto está mal
  • mostrame otra vez como te quedan los archivos...
gleaming cave
#

Y el flake.nix quedo asi

{
  description = "Home Manager configuration of thenat";

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

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

    anyrun = {
      url = "github:Kirottu/anyrun";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, home-manager, anyrun, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      homeConfigurations.thenat = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;

        # Specify your home configuration modules here, for example,
        # the path to your home.nix.
        modules = [ ./home.nix ];
        # Optionally use extraSpecialArgs
        # to pass through arguments to home.nix
      };
    };
}
#

Quitando anyrun de lo modulos

gleaming cave
plain prawn
gleaming cave
plain prawn
#

ponele el inputs. antes: inputs.anyrun.packages....

gleaming cave
plain prawn
#

Bueno, mañana si querés intentamos jaja

gleaming cave
#

Duda, puede ser esto obligatorio? ```nix
outputs = inputs@{ self, nixpkgs, home-manager, hyprland, ... }:

#

Lo encontre en muchos flakes

plain prawn
#

Pasa que depende como estás configurando vos

#

Mi configuración es muy dif, ya que es enormemente reproducible xD

gleaming cave
#

Ya me voy dormir, mañana lo intento arreglar

gleaming cave
#

@plain prawn Ya lo solucione, habia que pasar inputs con extraEspecialArgs

gleaming cave
#
# flake.nix

{
  # ...
  # Esto quedo igual que antes

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

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

gleaming cave
#

Y luego para definir anyrun era asi:

# anyrun.nix

{ 
  pkgs, 
  config,
  inputs,
  ... 
}: {
  imports = [
    inputs.anyrun.homeManagerModules.default
  ];

  programs.anyrun = {
    enable = true;
    config = {
      plugins = with inputs.anyrun.packages.${pkgs.system}; [
        applications
        randr
        rink
        shell
        symbols
        translate
      ];

      width.fraction = 0.3;
      y.absolute = 15;
      hidePluginInfo = true;
      closeOnClick = true;
    };
  };
}
#

En resumen, no estaba definiendo bien el flake