Non stop entertainment! The wackiest NixOS configuration to-date. thevoid.cafe/projects/puzzlevision
nixos flake flake-parts dotfiles home-manager nix

✨ Add custom packages support through pkgs directory

+46 -32
+2 -1
homes/x86_64-linux/jo/apps/firefox/default.nix
··· 15 15 @import "onebar/onebar.css"; 16 16 ''; 17 17 18 - home.file.".mozilla/firefox/default/chrome/onebar/onebar.css".source = ./onebar.css; 18 + home.file.".mozilla/firefox/default/chrome/onebar/onebar.css".source = 19 + mkIf config.programs.firefox.enable ./onebar.css; 19 20 }
-6
homes/x86_64-linux/jo/apps/youtube-music/catppuccin-frappe.css
··· 1 - /* frappe */ 2 - @import url("https://youtubemusic.catppuccin.com/src/frappe.css"); 3 - 4 - html:not(.style-scope) { 5 - --ctp-accent: var(--ctp-blue) !important; 6 - }
-6
homes/x86_64-linux/jo/apps/youtube-music/catppuccin-latte.css
··· 1 - /* latte */ 2 - @import url("https://youtubemusic.catppuccin.com/src/latte.css"); 3 - 4 - html:not(.style-scope) { 5 - --ctp-accent: var(--ctp-blue) !important; 6 - }
-6
homes/x86_64-linux/jo/apps/youtube-music/catppuccin-macchiato.css
··· 1 - /* macchiato */ 2 - @import url("https://youtubemusic.catppuccin.com/src/macchiato.css"); 3 - 4 - html:not(.style-scope) { 5 - --ctp-accent: var(--ctp-blue) !important; 6 - }
-6
homes/x86_64-linux/jo/apps/youtube-music/catppuccin-mocha.css
··· 1 - /* mocha */ 2 - @import url("https://youtubemusic.catppuccin.com/src/mocha.css"); 3 - 4 - html:not(.style-scope) { 5 - --ctp-accent: var(--ctp-blue) !important; 6 - }
-6
homes/x86_64-linux/jo/apps/youtube-music/default.nix
··· 1 - { 2 - ... 3 - }: 4 - { 5 - 6 - }
+5 -1
homes/x86_64-linux/jo/default.nix
··· 7 7 imports = [ 8 8 ./apps/discord 9 9 ./apps/firefox 10 - ./apps/youtube-music 11 10 ]; 12 11 13 12 puzzlevision = { ··· 34 33 path = "${config.home.homeDirectory}/.wakatime.cfg"; 35 34 }; 36 35 36 + programs.git = { 37 + enable = true; 38 + }; 39 + 37 40 home.packages = with pkgs; [ 38 41 ## GENERAL 39 42 ghostty ··· 53 56 ## RUNTIMES and CLIs for development 54 57 bun 55 58 git 59 + git-credential-oauth 56 60 attic-client 57 61 ]; 58 62
+3
modules/flake/default.nix
··· 5 5 6 6 # Automagically imports systems from "/systems/arch-classname/system-name". 7 7 ./systems.nix 8 + 9 + # Automagically import custom packages defined in "/pkgs/pkg-name/default.nix" 10 + ./packages.nix 8 11 ]; 9 12 }
+25
modules/flake/lib.nix
··· 26 26 else 27 27 [ ]; 28 28 29 + filesystemEntityToPackage = 30 + directory: pkgs: pkgArgs: name: type: 31 + if type == "directory" then 32 + dirToPkgAttrSet "${directory}/${name}" pkgs pkgArgs 33 + else if name == "default.nix" then 34 + { 35 + ${builtins.unsafeDiscardStringContext (builtins.baseNameOf directory)} = 36 + pkgs.callPackage "${directory}/${name}" pkgArgs; 37 + } 38 + else 39 + { }; 40 + 29 41 dirToModuleList = 30 42 directory: 31 43 let ··· 50 62 acc // (filesystemEntityToAttrSet directory importArgs name (builtins.getAttr name readDir)) 51 63 ) { } (builtins.attrNames readDir); 52 64 65 + dirToPkgAttrSet = 66 + directory: pkgs: pkgArgs: 67 + let 68 + # Read provided directory only once at the very start and save the result. 69 + readDir = readDirectory directory; 70 + in 71 + builtins.foldl' ( 72 + acc: name: 73 + acc // (filesystemEntityToPackage directory pkgs pkgArgs name (builtins.getAttr name readDir)) 74 + ) { } (builtins.attrNames readDir); 75 + 53 76 puzzlelib = dirToAttrSet ../../lib { inherit lib self; } // { 54 77 inherit 55 78 dirToAttrSet 79 + dirToPkgAttrSet 56 80 dirToModuleList 57 81 filesystemEntityToList 58 82 filesystemEntityToAttrSet 83 + filesystemEntityToPackage 59 84 ; 60 85 }; 61 86 in
+11
modules/flake/packages.nix
··· 1 + { 2 + self, 3 + ... 4 + }: 5 + { 6 + perSystem = 7 + { pkgs, ... }: 8 + { 9 + packages = self.lib.dirToPkgAttrSet ../../pkgs pkgs { }; 10 + }; 11 + }