Disable dotnet telemetry in dev shell
This commit is contained in:
parent
c0c9ab15d1
commit
fee929df47
11
README.md
11
README.md
|
@ -65,4 +65,13 @@ rec {
|
||||||
```
|
```
|
||||||
$ which dotnet
|
$ which dotnet
|
||||||
/nix/store/87s452c8wj2zmy21q8q394f6rzf5y1br-dotnet-sdk-6.0.100/bin/dotnet
|
/nix/store/87s452c8wj2zmy21q8q394f6rzf5y1br-dotnet-sdk-6.0.100/bin/dotnet
|
||||||
```
|
```
|
||||||
|
|
||||||
|
So now we have our development tools (well, tool). The `dotnet --help` text tells us a few things about telemetry, so let's define a prompt so we know when we're in the nix shell and then set the telemetry opt-out.
|
||||||
|
|
||||||
|
```
|
||||||
|
shellHook = ''
|
||||||
|
PS1="5dplomacy:\W$ "
|
||||||
|
'';
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT = 1;
|
||||||
|
```
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in rec {
|
in rec {
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
|
shellHook = ''
|
||||||
|
PS1="5dplomacy:\W$ "
|
||||||
|
'';
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT = 1;
|
||||||
packages = [ pkgs.dotnet-sdk ];
|
packages = [ pkgs.dotnet-sdk ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue