Skip to content

Commit

Permalink
lib/flake: import nixpkgs -> nixpkgs.legacyPackages
Browse files Browse the repository at this point in the history
Probably faster evaluation since there is nothing to import.
  • Loading branch information
thiagokokada committed Oct 5, 2023
1 parent 60511f1 commit ee6a45e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/flake.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ self, nixpkgs, home, flake-utils, ... }@inputs:
{ self, nixpkgs, home, flake-utils, ... }:

let
inherit (flake-utils.lib) eachDefaultSystem mkApp;
in
{
mkGHActionsYAMLs = names: eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pkgs = nixpkgs.legacyPackages.${system};
mkGHActionsYAML = name:
let
file = import (../actions/${name}.nix);
Expand Down Expand Up @@ -36,7 +36,7 @@ in
, deps ? pkgs: with pkgs; [ coreutils findutils nixpkgs-fmt ]
}: eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pkgs = nixpkgs.legacyPackages.${system};
in
{
apps.${name} = mkApp {
Expand Down Expand Up @@ -70,7 +70,7 @@ in
exePath = "/activate";
};

"nixosVMs/${hostname}" = let pkgs = import nixpkgs { inherit system; }; in
"nixosVMs/${hostname}" = let pkgs = nixpkgs.legacyPackages.${system}; in
mkApp {
drv = pkgs.writeShellScriptBin "run-${hostname}-vm" ''
env QEMU_OPTS="''${QEMU_OPTS:--cpu max -smp 4 -m 4096M -machine type=q35}" \
Expand All @@ -94,7 +94,7 @@ in
, homeManagerConfiguration ? home.lib.homeManagerConfiguration
}:
let
pkgs = import nixpkgs { inherit system; };
pkgs = nixpkgs.legacyPackages.${system};
homeDirectory = "${homePath}/${username}";
in
{
Expand Down

0 comments on commit ee6a45e

Please sign in to comment.