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, ...}: {
imports = [
../prisma.nix
];
home = {
packages = with pkgs; [
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
]);
{ pkgs, unstable, ... }: {
imports = [
../prisma.nix
../../../../customPackages
];
home = {
shellAliases = {
pd = "/home/meyer/dev/ts/pnpm/pnpm/dev/pd.js";
};
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, ...}:
let
cpkg = import ../../../customPackages { inherit pkgs inputs; };
in
{ pkgs, inputs, ... }:
{
home = {
packages = [
cpkg.frog
];
};
}
imports = [
../../../customPackages
];
home = {
packages = with pkgs.cpkg;[
frog
];
};
}

View file

@ -1,6 +1,6 @@
{pkgs, lib, inputs, ...}:
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
mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
pkgs.writeTextFile {
@ -17,6 +17,9 @@ mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
};
in
{
imports = [
../../../../customPackages
];
home = {
packages = with pkgs; [
# env for clipboard command will be required by their respective environemnts
@ -54,9 +57,9 @@ in
];
file = {
scripts = {
source = "${cpkg.scripts}";
source = "${pkgs.cpkg.scripts}";
target = ".scripts";
};
};
};
}
}

View file

@ -1,9 +1,16 @@
{ pkgs, inputs }:
rec {
# discord = nixpkgs.callPackage ./discord { };
discord = pkgs.callPackage ./discord/default.nix { };
vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
vencord = pkgs.callPackage ./vencord/package.nix { };
frog = pkgs.callPackage ./frog { };
scripts = inputs.scripts.flakePackage pkgs;
{ inputs, ... }: {
nixpkgs = {
overlays = [
(pkgs: _: {
cpkg = {
# discord = pkgs.callPackage ./discord/default.nix { };
# vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
# 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";
@ -34,14 +33,17 @@
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
chrome-pak = {
url = "git+file:./customPackages/chrome-pak-customizer";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
nixos-wsl,
nix-stable,
...
{ self
, nixpkgs
, nixos-wsl
, nix-stable
, ...
}@inputs:
# let
# boxes = [
@ -55,11 +57,10 @@
system = "aarch64-linux";
modules = [
(
{
pkgs,
modulesPath,
lib,
...
{ pkgs
, modulesPath
, lib
, ...
}:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];