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+ inputGroups = {
6+ core = {
7+ description = "Core Nix ecosystem" ;
8+ inputs = [
9+ "nixpkgs"
10+ "nixpkgs-unstable"
11+ "nixpkgs-master"
12+ "flake-compat"
13+ "flake-parts"
14+ ] ;
15+ } ;
16+
17+ system = {
18+ description = "System management" ;
19+ inputs = [
20+ "disko"
21+ "home-manager"
22+ "lanzaboote"
23+ "nix-darwin"
24+ "nix-rosetta-builder"
25+ "nixos-wsl"
26+ "sops-nix"
27+ ] ;
28+ } ;
29+
30+ apps = {
31+ description = "Applications & packages" ;
32+ inputs = [
33+ "anyrun-nixos-options"
34+ "catppuccin"
35+ "firefox-addons"
36+ "hypr-socket-watch"
37+ "hyprland"
38+ "khanelivim"
39+ "nh"
40+ "nix-flatpak"
41+ "nix-index-database"
42+ "stylix"
43+ "waybar"
44+ "yazi-flavors"
45+ ] ;
46+ } ;
47+ } ;
48+
49+ mkUpdateApp =
50+ name :
51+ { description , inputs } :
52+ {
53+ type = "app" ;
54+ program = lib . getExe (
55+ pkgs . writeShellApplication {
56+ name = "update-${ name } " ;
57+ meta = {
58+ mainProgram = "update-${ name } " ;
59+ description = "Update ${ description } inputs" ;
60+ } ;
61+ text = ''
62+ set -euo pipefail
63+
64+ echo "🔄 Updating ${ description } inputs..."
65+ nix flake update ${ lib . concatStringsSep " " inputs }
66+
67+ echo "✅ ${ description } inputs updated successfully!"
68+ '' ;
69+ }
70+ ) ;
71+ } ;
72+
73+ groupApps = lib . mapAttrs mkUpdateApp inputGroups ;
74+ in
475 {
5- apps = {
76+ apps = groupApps // {
677 update-all = {
778 type = "app" ;
879 program = lib . getExe (
980 pkgs . writeShellApplication {
1081 name = "update-all" ;
11- meta . mainProgram = "update-all" ;
82+ meta = {
83+ mainProgram = "update-all" ;
84+ description = "Update all flake inputs" ;
85+ } ;
1286 text = ''
1387 set -euo pipefail
1488
You can’t perform that action at this time.
0 commit comments