refactor: pass pkgs-unstable as argument in forAllSystems

This commit is contained in:
Guz
2025-08-07 19:18:18 -03:00
parent f623dff701
commit a7baa0179a
2 changed files with 20 additions and 32 deletions

View File

@@ -42,7 +42,8 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "github:hyprwm/Hyprland";
# hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = { outputs = {
@@ -61,9 +62,13 @@
forAllSystems = f: forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: let nixpkgs.lib.genAttrs systems (system: let
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfreePredicate = _: true;
};
in in
f { f {
inherit pkgs; inherit pkgs pkgs-unstable;
inherit (pkgs) lib; inherit (pkgs) lib;
}); });
@@ -111,16 +116,13 @@
}; };
}; };
homeConfigurations = forAllSystems ({pkgs, ...}: { homeConfigurations = forAllSystems ({
pkgs,
pkgs-unstable,
...
}: {
"guz" = home-manager.lib.homeManagerConfiguration { "guz" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs pkgs-unstable;
extraSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
system = pkgs.system;
config.allowUnfreePredicate = _: true;
};
inherit inputs self;
};
modules = [ modules = [
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
./style.nix ./style.nix
@@ -129,14 +131,7 @@
]; ];
}; };
"guz-lite" = home-manager.lib.homeManagerConfiguration { "guz-lite" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs pkgs-unstable;
extraSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
system = pkgs.system;
config.allowUnfreePredicate = _: true;
};
inherit inputs self;
};
modules = [ modules = [
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
./style.nix ./style.nix
@@ -145,14 +140,7 @@
]; ];
}; };
"worm" = home-manager.lib.homeManagerConfiguration { "worm" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs pkgs-unstable;
extraSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
system = pkgs.system;
config.allowUnfreePredicate = _: true;
};
inherit inputs self;
};
modules = [ modules = [
./home/worm ./home/worm
]; ];
@@ -202,6 +190,7 @@
packages = forAllSystems ({ packages = forAllSystems ({
lib, lib,
pkgs, pkgs,
pkgs-unstable,
... ...
}: { }: {
davincify = pkgs.callPackage ./packages/davincify {}; davincify = pkgs.callPackage ./packages/davincify {};
@@ -210,7 +199,7 @@
neovim = inputs.neovim.packages.${pkgs.system}.default; neovim = inputs.neovim.packages.${pkgs.system}.default;
devkit = devkit =
(import ./packages/devkit {inherit inputs pkgs;}) (import ./packages/devkit {inherit inputs pkgs pkgs-unstable;})
// { // {
neovim = self.packages.${pkgs.system}.neovim; neovim = self.packages.${pkgs.system}.neovim;
}; };

View File

@@ -1,9 +1,8 @@
{ {
pkgs, pkgs,
pkgs-unstable,
inputs, inputs,
}: let }: rec {
unstable = import inputs.nixpkgs-unstable {inherit (pkgs) system;};
in rec {
ghostty = pkgs.callPackage ./ghostty {}; ghostty = pkgs.callPackage ./ghostty {};
git = pkgs.callPackage ./git {}; git = pkgs.callPackage ./git {};
lazygit = pkgs.callPackage ./lazygit {}; lazygit = pkgs.callPackage ./lazygit {};
@@ -13,7 +12,7 @@ in rec {
# CURRENTLY BORKED https://github.com/zellij-org/zellij/issues/3970 # CURRENTLY BORKED https://github.com/zellij-org/zellij/issues/3970
zellij = pkgs.callPackage ./zellij { zellij = pkgs.callPackage ./zellij {
shell = zsh; shell = zsh;
zellij = unstable.zellij; zellij = pkgs-unstable.zellij;
}; };
zsh = pkgs.callPackage ./zsh {}; zsh = pkgs.callPackage ./zsh {};
} }