/ config / scripts.nix
scripts.nix
 1  {
 2    pkgs,
 3    config,
 4    ...
 5  }:
 6  {
 7    scripts = {
 8      # doctor = {
 9      #   packages = with pkgs; [
10      #     figlet
11      #     shellspec
12      #   ];
13  
14      #   description = " 💊 Run Microdoctor health-check suite with docs output";
15      #   exec = ''
16      #     figlet -cf slant "💊 Microdoctor";
17      #     shellspec -c "${config.git.root}/tests" --quiet "$@";
18      #   '';
19      # };
20  
21      docs = {
22        description = " 📚 RTFM";
23        exec = "bunx likec4 start ${config.git.root}/docs";
24      };
25  
26      run = {
27        exec = ''devenv tasks run "$@" -m before'';
28      };
29  
30      mic = {
31        description = " đŸ•šī¸ Launch Microvisor CLI";
32        exec = ''cargo loco "$@"'';
33      };
34  
35      up = {
36        description = " 🎉 Fire up the Microvisor Kernel";
37        exec = ''devenv up "$@"'';
38      };
39  
40      console = {
41        packages = with pkgs; [
42          ttyd
43        ];
44        description = "🕹  Fire up the Microvisor Console";
45        exec = ''
46          ttyd --writable --browser --url-arg --once process-compose
47        '';
48      };
49  
50      clean = {
51        description = "   🚨 Remove all files matched by .gitignore, including .env*";
52        exec = "git clean -fdX";
53      };
54    };
55  }