File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11_ : {
22 perSystem =
33 { pkgs , lib , ... } :
4+ let
5+ # Input groups based on our flake.nix organization
6+ inputGroups = {
7+ core = {
8+ description = "Core Nix ecosystem" ;
9+ inputs = [
10+ "nixpkgs"
11+ "nixpkgs-unstable"
12+ "nixpkgs-master"
13+ "flake-compat"
14+ "flake-parts"
15+ ] ;
16+ } ;
17+
18+ system = {
19+ description = "System management" ;
20+ inputs = [
21+ "disko"
22+ "home-manager"
23+ "lanzaboote"
24+ "nix-darwin"
25+ "nix-rosetta-builder"
26+ "nixos-wsl"
27+ "sops-nix"
28+ ] ;
29+ } ;
30+
31+ apps = {
32+ description = "Applications & packages" ;
33+ inputs = [
34+ "anyrun-nixos-options"
35+ "catppuccin"
36+ "firefox-addons"
37+ "hypr-socket-watch"
38+ "hyprland"
39+ "khanelivim"
40+ "nh"
41+ "nix-flatpak"
42+ "nix-index-database"
43+ "stylix"
44+ "waybar"
45+ "yazi-flavors"
46+ ] ;
47+ } ;
48+ } ;
49+
50+ mkUpdateApp =
51+ name :
52+ { description , inputs } :
53+ {
54+ type = "app" ;
55+ program = lib . getExe (
56+ pkgs . writeShellApplication {
57+ name = "update-${ name } " ;
58+ meta = {
59+ mainProgram = "update-${ name } " ;
60+ description = "Update ${ description } inputs" ;
61+ } ;
62+ text = ''
63+ set -euo pipefail
64+
65+ echo "🔄 Updating ${ description } inputs..."
66+ nix flake update ${ lib . concatStringsSep " " inputs }
67+
68+ echo "✅ ${ description } inputs updated successfully!"
69+ '' ;
70+ }
71+ ) ;
72+ } ;
73+
74+ groupApps = lib . mapAttrs mkUpdateApp inputGroups ;
75+ in
476 {
5- apps = {
77+ apps = groupApps // {
678 update-all = {
779 type = "app" ;
880 program = lib . getExe (
981 pkgs . writeShellApplication {
1082 name = "update-all" ;
11- meta . mainProgram = "update-all" ;
83+ meta = {
84+ mainProgram = "update-all" ;
85+ description = "Update all flake inputs" ;
86+ } ;
1287 text = ''
1388 set -euo pipefail
1489
You can’t perform that action at this time.
0 commit comments