refactor custom packages to be a module

This commit is contained in:
sadan 2024-12-16 19:21:14 -05:00
parent c73e0afd18
commit aa209a91b9
No known key found for this signature in database
5 changed files with 71 additions and 54 deletions

View file

@ -1,23 +1,29 @@
{pkgs, unstable, ...}: { { pkgs, unstable, ... }: {
imports = [ imports = [
../prisma.nix ../prisma.nix
]; ../../../../customPackages
home = { ];
packages = with pkgs; [ home = {
lemminx shellAliases = {
deno pd = "/home/meyer/dev/ts/pnpm/pnpm/dev/pd.js";
eslint_d
vscode-langservers-extracted
nodePackages_latest.typescript-language-server
typescript
unstable.eslint
corepack_22
nodejs_22
] ++ (with pkgs.nodePackages; [
nodemon
ts-node
pnpm
live-server
]);
}; };
packages = with pkgs;
[
cpkg.chrome-pak-customizer
lemminx
deno
eslint_d
vscode-langservers-extracted
nodePackages_latest.typescript-language-server
typescript
unstable.eslint
corepack_22
nodejs_22
] ++ (with pkgs.nodePackages; [
nodemon
ts-node
pnpm
live-server
]);
};
} }

View file

@ -1,11 +1,11 @@
{pkgs, inputs, ...}: { pkgs, inputs, ... }:
let
cpkg = import ../../../customPackages { inherit pkgs inputs; };
in
{ {
home = { imports = [
packages = [ ../../../customPackages
cpkg.frog ];
]; home = {
}; packages = with pkgs.cpkg;[
} frog
];
};
}

View file

@ -1,6 +1,6 @@
{pkgs, lib, inputs, ...}: {pkgs, lib, inputs, ...}:
let let
cpkg = import ../../../../customPackages { inherit pkgs inputs; }; # cpkg = import ../../../../customPackages { inherit pkgs inputs; };
# https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6 # https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript = { name, version ? "0.0.1", file, env ? [ ] }: mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
pkgs.writeTextFile { pkgs.writeTextFile {
@ -17,6 +17,9 @@ mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
}; };
in in
{ {
imports = [
../../../../customPackages
];
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
# env for clipboard command will be required by their respective environemnts # env for clipboard command will be required by their respective environemnts
@ -54,9 +57,9 @@ in
]; ];
file = { file = {
scripts = { scripts = {
source = "${cpkg.scripts}"; source = "${pkgs.cpkg.scripts}";
target = ".scripts"; target = ".scripts";
}; };
}; };
}; };
} }

View file

@ -1,9 +1,16 @@
{ pkgs, inputs }: { inputs, ... }: {
rec { nixpkgs = {
# discord = nixpkgs.callPackage ./discord { }; overlays = [
discord = pkgs.callPackage ./discord/default.nix { }; (pkgs: _: {
vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; }; cpkg = {
vencord = pkgs.callPackage ./vencord/package.nix { }; # discord = pkgs.callPackage ./discord/default.nix { };
frog = pkgs.callPackage ./frog { }; # vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
scripts = inputs.scripts.flakePackage pkgs; # vencord = pkgs.callPackage ./vencord/package.nix { };
frog = pkgs.callPackage ./frog { };
chrome-pak-customizer = pkgs.callPackage inputs.chrome-pak { };
scripts = inputs.scripts.flakePackage pkgs;
};
})
];
};
} }

View file

@ -1,4 +1,3 @@
#commit
{ {
description = "Nixos config flake"; description = "Nixos config flake";
@ -34,14 +33,17 @@
url = "github:danth/stylix"; url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
chrome-pak = {
url = "git+file:./customPackages/chrome-pak-customizer";
flake = false;
};
}; };
outputs = outputs =
{ { self
self, , nixpkgs
nixpkgs, , nixos-wsl
nixos-wsl, , nix-stable
nix-stable, , ...
...
}@inputs: }@inputs:
# let # let
# boxes = [ # boxes = [
@ -55,11 +57,10 @@
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
( (
{ { pkgs
pkgs, , modulesPath
modulesPath, , lib
lib, , ...
...
}: }:
{ {
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ]; imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];