|
1 |
| -{ config, pkgs, lib, ... }: |
| 1 | +{ |
| 2 | + config, |
| 3 | + pkgs, |
| 4 | + lib, |
| 5 | + ... |
| 6 | +}: |
2 | 7 |
|
3 | 8 | {
|
4 | 9 | xdg.enable = lib.mkIf pkgs.stdenv.isDarwin false;
|
|
54 | 59 | };
|
55 | 60 | };
|
56 | 61 | };
|
57 |
| - aliases = { alias = { pp = "v1/pods"; }; }; |
| 62 | + aliases = { |
| 63 | + alias = { |
| 64 | + pp = "v1/pods"; |
| 65 | + }; |
| 66 | + }; |
58 | 67 | plugin = {
|
59 | 68 | plugin = {
|
60 | 69 | fred = {
|
|
63 | 72 | scopes = [ "po" ];
|
64 | 73 | command = "kubectl";
|
65 | 74 | background = false;
|
66 |
| - args = |
67 |
| - [ "logs" "-f" "$NAME" "-n" "$NAMESPACE" "--context" "$CLUSTER" ]; |
| 75 | + args = [ |
| 76 | + "logs" |
| 77 | + "-f" |
| 78 | + "$NAME" |
| 79 | + "-n" |
| 80 | + "$NAMESPACE" |
| 81 | + "--context" |
| 82 | + "$CLUSTER" |
| 83 | + ]; |
68 | 84 | };
|
69 | 85 | };
|
70 | 86 | };
|
71 | 87 | views = {
|
72 | 88 | k9s = {
|
73 | 89 | views = {
|
74 | 90 | "v1/pods" = {
|
75 |
| - columns = [ "AGE" "NAMESPACE" "NAME" "IP" "NODE" "STATUS" "READY" ]; |
| 91 | + columns = [ |
| 92 | + "AGE" |
| 93 | + "NAMESPACE" |
| 94 | + "NAME" |
| 95 | + "IP" |
| 96 | + "NODE" |
| 97 | + "STATUS" |
| 98 | + "READY" |
| 99 | + ]; |
76 | 100 | };
|
77 | 101 | };
|
78 | 102 | };
|
79 | 103 | };
|
80 | 104 | };
|
81 | 105 |
|
82 |
| - nmt.script = let |
83 |
| - configDir = if !pkgs.stdenv.isDarwin then |
84 |
| - ".config/k9s" |
85 |
| - else |
86 |
| - "Library/Application Support/k9s"; |
87 |
| - in '' |
88 |
| - assertFileExists "home-files/${configDir}/config.yaml" |
89 |
| - assertFileContent \ |
90 |
| - "home-files/${configDir}/config.yaml" \ |
91 |
| - ${./example-config-expected.yaml} |
92 |
| - assertFileExists "home-files/${configDir}/skins/default.yaml" |
93 |
| - assertFileContent \ |
94 |
| - "home-files/${configDir}/skins/default.yaml" \ |
95 |
| - ${./example-skin-expected.yaml} |
96 |
| - assertFileExists "home-files/${configDir}/skins/default2.yaml" |
97 |
| - assertFileContent \ |
98 |
| - "home-files/${configDir}/skins/default2.yaml" \ |
99 |
| - ${./example-skin-expected.yaml} |
100 |
| - assertFileExists "home-files/${configDir}/skins/alt-skin.yaml" |
101 |
| - assertFileContent \ |
102 |
| - "home-files/${configDir}/skins/alt-skin.yaml" \ |
103 |
| - ${./example-skin-expected-alt.yaml} |
104 |
| - assertFileExists "home-files/${configDir}/hotkeys.yaml" |
105 |
| - assertFileContent \ |
106 |
| - "home-files/${configDir}/hotkeys.yaml" \ |
107 |
| - ${./example-hotkey-expected.yaml} |
108 |
| - assertFileExists "home-files/${configDir}/aliases.yaml" |
109 |
| - assertFileContent \ |
110 |
| - "home-files/${configDir}/aliases.yaml" \ |
111 |
| - ${./example-aliases-expected.yaml} |
112 |
| - assertFileExists "home-files/${configDir}/plugins.yaml" |
113 |
| - assertFileContent \ |
114 |
| - "home-files/${configDir}/plugins.yaml" \ |
115 |
| - ${./example-plugin-expected.yaml} |
116 |
| - assertFileExists "home-files/${configDir}/views.yaml" |
117 |
| - assertFileContent \ |
118 |
| - "home-files/${configDir}/views.yaml" \ |
119 |
| - ${./example-views-expected.yaml} |
120 |
| - ''; |
| 106 | + nmt.script = |
| 107 | + let |
| 108 | + configDir = if !pkgs.stdenv.isDarwin then ".config/k9s" else "Library/Application Support/k9s"; |
| 109 | + in |
| 110 | + '' |
| 111 | + assertFileExists "home-files/${configDir}/config.yaml" |
| 112 | + assertFileContent \ |
| 113 | + "home-files/${configDir}/config.yaml" \ |
| 114 | + ${./example-config-expected.yaml} |
| 115 | + assertFileExists "home-files/${configDir}/skins/default.yaml" |
| 116 | + assertFileContent \ |
| 117 | + "home-files/${configDir}/skins/default.yaml" \ |
| 118 | + ${./example-skin-expected.yaml} |
| 119 | + assertFileExists "home-files/${configDir}/skins/default2.yaml" |
| 120 | + assertFileContent \ |
| 121 | + "home-files/${configDir}/skins/default2.yaml" \ |
| 122 | + ${./example-skin-expected.yaml} |
| 123 | + assertFileExists "home-files/${configDir}/skins/alt-skin.yaml" |
| 124 | + assertFileContent \ |
| 125 | + "home-files/${configDir}/skins/alt-skin.yaml" \ |
| 126 | + ${./example-skin-expected-alt.yaml} |
| 127 | + assertFileExists "home-files/${configDir}/hotkeys.yaml" |
| 128 | + assertFileContent \ |
| 129 | + "home-files/${configDir}/hotkeys.yaml" \ |
| 130 | + ${./example-hotkey-expected.yaml} |
| 131 | + assertFileExists "home-files/${configDir}/aliases.yaml" |
| 132 | + assertFileContent \ |
| 133 | + "home-files/${configDir}/aliases.yaml" \ |
| 134 | + ${./example-aliases-expected.yaml} |
| 135 | + assertFileExists "home-files/${configDir}/plugins.yaml" |
| 136 | + assertFileContent \ |
| 137 | + "home-files/${configDir}/plugins.yaml" \ |
| 138 | + ${./example-plugin-expected.yaml} |
| 139 | + assertFileExists "home-files/${configDir}/views.yaml" |
| 140 | + assertFileContent \ |
| 141 | + "home-files/${configDir}/views.yaml" \ |
| 142 | + ${./example-views-expected.yaml} |
| 143 | + ''; |
121 | 144 | }
|
0 commit comments