|
13 | 13 | };
|
14 | 14 | };
|
15 | 15 |
|
16 |
| - config = |
17 |
| - lib.mkIf config.sof.aws.enable { |
18 |
| - home.packages = builtins.attrValues { |
19 |
| - inherit (pkgs) |
20 |
| - awsbck |
21 |
| - awsls |
22 |
| - awsume |
23 |
| - cw |
24 |
| - e1s |
25 |
| - pacu |
26 |
| - rain |
27 |
| - ssmsh |
28 |
| - yatas |
29 |
| - ; |
30 |
| - }; |
| 16 | + config = lib.mkIf config.sof.aws.enable { |
| 17 | + home.packages = builtins.attrValues { |
| 18 | + inherit (pkgs) |
| 19 | + awsbck |
| 20 | + awsls |
| 21 | + awsume |
| 22 | + cw |
| 23 | + e1s |
| 24 | + pacu |
| 25 | + rain |
| 26 | + ssmsh |
| 27 | + yatas |
| 28 | + ; |
| 29 | + }; |
31 | 30 |
|
32 |
| - programs = { |
33 |
| - awscli = { |
34 |
| - enable = true; |
35 |
| - }; |
| 31 | + programs = { |
| 32 | + awscli = { |
| 33 | + enable = true; |
36 | 34 | };
|
| 35 | + }; |
37 | 36 |
|
38 |
| - # aws-cli does not work well with xdg base directories |
39 |
| - # https://github.com/aws/aws-sdk/issues/30#issuecomment-532208981 |
40 |
| - home.sessionVariables = { |
41 |
| - AWS_CONFIG_FILE = "${config.xdg.configHome}/aws/config"; |
42 |
| - AWS_CLI_HISTORY_FILE = "${config.xdg.dataHome}/aws/history"; |
43 |
| - AWS_CREDENTIALS_FILE = "${config.xdg.dataHome}/aws/credentials"; |
44 |
| - AWS_SHARED_CREDENTIALS_FILE = "${config.xdg.dataHome}/aws/shared-credentials"; |
45 |
| - AWS_WEB_IDENTITY_TOKEN_FILE = "${config.xdg.dataHome}/aws/token"; |
46 |
| - }; |
47 |
| - } |
48 |
| - // lib.mkIf config.sof.boxxy.enable { |
49 |
| - programs.boxxy = lib.mkIf config.sof.boxxy.enable { |
50 |
| - rules = { |
| 37 | + # aws-cli does not work well with xdg base directories |
| 38 | + # https://github.com/aws/aws-sdk/issues/30#issuecomment-532208981 |
| 39 | + home.sessionVariables = { |
| 40 | + AWS_CONFIG_FILE = "${config.xdg.configHome}/aws/config"; |
| 41 | + AWS_CLI_HISTORY_FILE = "${config.xdg.dataHome}/aws/history"; |
| 42 | + AWS_CREDENTIALS_FILE = "${config.xdg.dataHome}/aws/credentials"; |
| 43 | + AWS_SHARED_CREDENTIALS_FILE = "${config.xdg.dataHome}/aws/shared-credentials"; |
| 44 | + AWS_WEB_IDENTITY_TOKEN_FILE = "${config.xdg.dataHome}/aws/token"; |
| 45 | + }; |
| 46 | + |
| 47 | + programs.boxxy = lib.mkIf config.sof.boxxy.enable { |
| 48 | + rules = [ |
| 49 | + { |
51 | 50 | name = "redirect aws-cli from ~/.aws to ${config.xdg.configHome}/aws";
|
52 | 51 | target = "~/.aws";
|
53 | 52 | rewrite = "${config.xdg.configHome}/aws";
|
54 |
| - }; |
55 |
| - }; |
56 |
| - |
57 |
| - home.shellAliases = { |
58 |
| - aws = "boxxy aws"; |
59 |
| - }; |
| 53 | + } |
| 54 | + ]; |
60 | 55 | };
|
| 56 | + |
| 57 | + home.shellAliases = lib.mkIf config.sof.boxxy.enable { aws = "boxxy aws"; }; |
| 58 | + }; |
61 | 59 | }
|
0 commit comments