mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 04:10:05 +00:00
✨ Add custom packages support through pkgs directory
This commit is contained in:
parent
f6058e8547
commit
6c0cc52a3c
10 changed files with 46 additions and 32 deletions
|
@ -15,5 +15,6 @@ in
|
|||
@import "onebar/onebar.css";
|
||||
'';
|
||||
|
||||
home.file.".mozilla/firefox/default/chrome/onebar/onebar.css".source = ./onebar.css;
|
||||
home.file.".mozilla/firefox/default/chrome/onebar/onebar.css".source =
|
||||
mkIf config.programs.firefox.enable ./onebar.css;
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
/* frappe */
|
||||
@import url("https://youtubemusic.catppuccin.com/src/frappe.css");
|
||||
|
||||
html:not(.style-scope) {
|
||||
--ctp-accent: var(--ctp-blue) !important;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
/* latte */
|
||||
@import url("https://youtubemusic.catppuccin.com/src/latte.css");
|
||||
|
||||
html:not(.style-scope) {
|
||||
--ctp-accent: var(--ctp-blue) !important;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
/* macchiato */
|
||||
@import url("https://youtubemusic.catppuccin.com/src/macchiato.css");
|
||||
|
||||
html:not(.style-scope) {
|
||||
--ctp-accent: var(--ctp-blue) !important;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
/* mocha */
|
||||
@import url("https://youtubemusic.catppuccin.com/src/mocha.css");
|
||||
|
||||
html:not(.style-scope) {
|
||||
--ctp-accent: var(--ctp-blue) !important;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
imports = [
|
||||
./apps/discord
|
||||
./apps/firefox
|
||||
./apps/youtube-music
|
||||
];
|
||||
|
||||
puzzlevision = {
|
||||
|
@ -34,6 +33,10 @@
|
|||
path = "${config.home.homeDirectory}/.wakatime.cfg";
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
## GENERAL
|
||||
ghostty
|
||||
|
@ -53,6 +56,7 @@
|
|||
## RUNTIMES and CLIs for development
|
||||
bun
|
||||
git
|
||||
git-credential-oauth
|
||||
attic-client
|
||||
];
|
||||
|
||||
|
|
|
@ -5,5 +5,8 @@
|
|||
|
||||
# Automagically imports systems from "/systems/arch-classname/system-name".
|
||||
./systems.nix
|
||||
|
||||
# Automagically import custom packages defined in "/pkgs/pkg-name/default.nix"
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -26,6 +26,18 @@ let
|
|||
else
|
||||
[ ];
|
||||
|
||||
filesystemEntityToPackage =
|
||||
directory: pkgs: pkgArgs: name: type:
|
||||
if type == "directory" then
|
||||
dirToPkgAttrSet "${directory}/${name}" pkgs pkgArgs
|
||||
else if name == "default.nix" then
|
||||
{
|
||||
${builtins.unsafeDiscardStringContext (builtins.baseNameOf directory)} =
|
||||
pkgs.callPackage "${directory}/${name}" pkgArgs;
|
||||
}
|
||||
else
|
||||
{ };
|
||||
|
||||
dirToModuleList =
|
||||
directory:
|
||||
let
|
||||
|
@ -50,12 +62,25 @@ let
|
|||
acc // (filesystemEntityToAttrSet directory importArgs name (builtins.getAttr name readDir))
|
||||
) { } (builtins.attrNames readDir);
|
||||
|
||||
dirToPkgAttrSet =
|
||||
directory: pkgs: pkgArgs:
|
||||
let
|
||||
# Read provided directory only once at the very start and save the result.
|
||||
readDir = readDirectory directory;
|
||||
in
|
||||
builtins.foldl' (
|
||||
acc: name:
|
||||
acc // (filesystemEntityToPackage directory pkgs pkgArgs name (builtins.getAttr name readDir))
|
||||
) { } (builtins.attrNames readDir);
|
||||
|
||||
puzzlelib = dirToAttrSet ../../lib { inherit lib self; } // {
|
||||
inherit
|
||||
dirToAttrSet
|
||||
dirToPkgAttrSet
|
||||
dirToModuleList
|
||||
filesystemEntityToList
|
||||
filesystemEntityToAttrSet
|
||||
filesystemEntityToPackage
|
||||
;
|
||||
};
|
||||
in
|
||||
|
|
11
modules/flake/packages.nix
Normal file
11
modules/flake/packages.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
self,
|
||||
...
|
||||
}:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
packages = self.lib.dirToPkgAttrSet ../../pkgs pkgs { };
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue