M dotfiles/templates/default.nix => dotfiles/templates/default.nix +5 -0
@@ 11,6 11,11 @@
path = ./go;
};
+ dotnet = {
+ description = "dotnet Template";
+ path = ./dotnet;
+ };
+
# nix flake init -t github:ratsclub/dotfiles#templates.basic
basic = {
description = "A very basic flake";
A dotfiles/templates/dotnet/.editorconfig => dotfiles/templates/dotnet/.editorconfig +36 -0
@@ 0,0 1,36 @@
+# http://editorconfig.org
+#
+root = true
+
+[*.fs]
+indent_style = space
+indent_size = 4
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+# Use 4 spaces for the Python files
+[*.py]
+indent_size = 4
+max_line_length = 80
+
+# The JSON files contain newlines inconsistently
+[*.json]
+insert_final_newline = ignore
+
+# Minified JavaScript files shouldn't be changed
+[**.min.js]
+indent_style = ignore
+insert_final_newline = ignore
+
+# Makefiles always use tabs for indentation
+[Makefile]
+indent_style = tab
+
+# Batch files use tabs for indentation
+[*.bat]
+indent_style = tab
+
+[*.md]
+trim_trailing_whitespace = false
A dotfiles/templates/dotnet/flake.nix => dotfiles/templates/dotnet/flake.nix +33 -0
@@ 0,0 1,33 @@
+{
+ description = "A basic dotnet flake template";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, utils }:
+ { } // utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+ inherit (pkgs)
+ mkShell
+ lib
+
+ dotnet-sdk
+ icu
+ ;
+ in
+ {
+ devShells.default = mkShell {
+ buildInputs = [
+ dotnet-sdk
+ icu
+ ];
+ shellHook = ''
+ export DOTNET_ROOT=${dotnet-sdk}
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib.makeLibraryPath [ icu ]}
+ '';
+ };
+ });
+}