about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-01-21 13:17:57 -0800
committerFranck Cuny <franck@fcuny.net>2024-01-21 13:22:35 -0800
commite6ed56c9b5844e2317d83ac55b64a78ff068f189 (patch)
treee8b44874566df80a1444b34be687323f1774ee5e
parentchore: update flake (diff)
downloadworld-e6ed56c9b5844e2317d83ac55b64a78ff068f189.tar.gz
delete all the templates
This is too much work to maintain, and I'm going to put all my tools
and scripts in this repository, so I won't need that anymore.
-rw-r--r--README.md10
-rw-r--r--templates/default.nix6
-rw-r--r--templates/go/.envrc1
-rw-r--r--templates/go/.github/dependabot.yml10
-rw-r--r--templates/go/.github/workflows/ci.yaml30
-rw-r--r--templates/go/.github/workflows/release.yaml25
-rw-r--r--templates/go/.github/workflows/update.yaml28
-rw-r--r--templates/go/.gitignore4
-rw-r--r--templates/go/.goreleaser.yaml28
-rw-r--r--templates/go/LICENSE20
-rw-r--r--templates/go/Makefile19
-rw-r--r--templates/go/README.md3
-rw-r--r--templates/go/flake.nix77
-rw-r--r--templates/go/go.mod3
-rw-r--r--templates/go/main.go11
15 files changed, 1 insertions, 274 deletions
diff --git a/README.md b/README.md
index 3dcc633..f927e2c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Configurations for my machines.
+Tools, scripts, and configurations for my machines.
 
 ## Operations
 
@@ -20,11 +20,3 @@ I use [devshell](https://github.com/numtide/devshell) to manage this environment
 ```
 
 and you can type any of these commands.
-
-## templates
-
-To use one of the template, run:
-
-``` sh
-nix flake init -t .#go
-```
diff --git a/templates/default.nix b/templates/default.nix
deleted file mode 100644
index adc239f..0000000
--- a/templates/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  go = {
-    description = "go template";
-    path = ./go;
-  };
-}
diff --git a/templates/go/.envrc b/templates/go/.envrc
deleted file mode 100644
index a5dbbcb..0000000
--- a/templates/go/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake .
diff --git a/templates/go/.github/dependabot.yml b/templates/go/.github/dependabot.yml
deleted file mode 100644
index 0cfc43c..0000000
--- a/templates/go/.github/dependabot.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-version: 2
-updates:
-  - package-ecosystem: "github-actions"
-    directory: "/"
-    schedule:
-      interval: "weekly"
-  - package-ecosystem: "gomod"
-    directory: "/"
-    schedule:
-      interval: "weekly"
diff --git a/templates/go/.github/workflows/ci.yaml b/templates/go/.github/workflows/ci.yaml
deleted file mode 100644
index 72dbdc4..0000000
--- a/templates/go/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: "Build flake outputs"
-on:
-  push:
-    branches:
-      - main
-  pull_request:
-    branches:
-      - main
-    types:
-      - opened
-      - synchronize
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-      matrix:
-        output:
-          - devShell.x86_64-linux
-    steps:
-      - uses: actions/checkout@v4
-        with:
-          fetch-depth: 0
-      - name: Install Nix
-        uses: cachix/install-nix-action@v24
-        with:
-          extra_nix_config: |
-            experimental-features = nix-command flakes
-      - run: nix flake check
-      - run: nix develop -c echo OK
diff --git a/templates/go/.github/workflows/release.yaml b/templates/go/.github/workflows/release.yaml
deleted file mode 100644
index a828de1..0000000
--- a/templates/go/.github/workflows/release.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: release
-on:
-  push:
-    tags:
-      - "*"
-permissions:
-  contents: write
-jobs:
-  goreleaser:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          fetch-depth: 0
-      - run: git fetch --force --tags
-      - uses: actions/setup-go@v4
-        with:
-          go-version: stable
-      - uses: goreleaser/goreleaser-action@v5
-        with:
-          distribution: goreleaser
-          version: latest
-          args: release --clean
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/templates/go/.github/workflows/update.yaml b/templates/go/.github/workflows/update.yaml
deleted file mode 100644
index 2723a6f..0000000
--- a/templates/go/.github/workflows/update.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: 'Update flake.lock'
-on:
-  workflow_dispatch:
-  schedule:
-    - cron: '30 5 * * 0'
-# you need to grant permissions to create PR:
-# https://github.com/DeterminateSystems/update-flake-lock/issues/75
-jobs:
-  update-flake-lock:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v4
-      - name: Install Nix
-        uses: cachix/install-nix-action@v23
-        with:
-          extra_nix_config: |
-            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
-      - name: Update flake.lock
-        id: update-flake-lock
-        uses: DeterminateSystems/update-flake-lock@v20
-        with:
-          pr-title: "Update flake.lock"
-          commit-msg: "chore: update flake"
-          pr-assignees: fcuny
-          pr-labels: |
-            dependencies
-            automated
diff --git a/templates/go/.gitignore b/templates/go/.gitignore
deleted file mode 100644
index efec39a..0000000
--- a/templates/go/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/result
-/.pre-commit-config.yaml
-/bin/
-/dist/
diff --git a/templates/go/.goreleaser.yaml b/templates/go/.goreleaser.yaml
deleted file mode 100644
index d907209..0000000
--- a/templates/go/.goreleaser.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-project_name: fixproject
-builds:
-  - id: default
-    main: .
-    binary: fixproject
-    flags:
-      - -tags
-      - -trimpath
-    env:
-      - CGO_ENABLED=0
-    ldflags:
-      - -s -w -X main.Version={{.Version}} -X main.BuildDate={{ .CommitDate }}
-    goos:
-      - darwin
-      - linux
-    goarch:
-      - amd64
-      - arm64
-archives:
-  - id: default
-    builds:
-      - default
-    name_template: "fixproject_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
-    format: tar.gz
-checksum:
-  name_template: "checksums.txt"
-snapshot:
-  name_template: "{{ incpatch .Version }}-next"
diff --git a/templates/go/LICENSE b/templates/go/LICENSE
deleted file mode 100644
index c27fed0..0000000
--- a/templates/go/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) Franck Cuny
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/templates/go/Makefile b/templates/go/Makefile
deleted file mode 100644
index 34fe639..0000000
--- a/templates/go/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-.PHONY: build run clean
-
-BUILD_DIR=bin
-PROGRAM_FILE=fixproject
-VERSION=$(shell git describe --tag --always)
-BUILD_DATE ?= $(shell TZ=UTC0 git show -s --format=%cd --date=format-local:'%Y-%m-%dT%H:%M:%SZ' HEAD)
-
-build:
-	@go build \
-		-o ${BUILD_DIR}/${PROGRAM_FILE} \
-		-ldflags "-X main.Version=${VERSION} -X main.BuildDate=${BUILD_DATE}" \
-		-trimpath main.go
-
-run: build
-	@./${BUILD_DIR}/${PROGRAM_FILE}
-
-clean:
-	@go clean
-	@rm -rf ${BUILD_DIR}/${PROGRAM_FILE}
diff --git a/templates/go/README.md b/templates/go/README.md
deleted file mode 100644
index f27d226..0000000
--- a/templates/go/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-New shiny project
-
-TODO: replace all instances of `fixproject` with the name of the project.
diff --git a/templates/go/flake.nix b/templates/go/flake.nix
deleted file mode 100644
index 4746a98..0000000
--- a/templates/go/flake.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{
-  inputs = {
-    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
-    flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; };
-    treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
-    devshell.url = "github:numtide/devshell";
-    pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
-  };
-
-  outputs = inputs:
-    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
-      systems = [ "x86_64-linux" "aarch64-darwin" ];
-      imports = [
-        inputs.treefmt-nix.flakeModule
-        inputs.pre-commit-hooks.flakeModule
-        inputs.devshell.flakeModule
-      ];
-
-      perSystem = { pkgs, config, ... }:
-        let
-          src = ./.;
-          package = {
-            # Replace the following throws with strings with the appropriate values
-            name = throw "package.name: missing value";
-            version = throw "package.name: missing value";
-            vendorHash = null;
-          };
-        in
-        {
-          packages = {
-            ${package.name} = pkgs.buildGoModule {
-              pname = package.name;
-              inherit (package)
-                version
-                vendorHash;
-              inherit src;
-            };
-            default = config.packages.${package.name};
-          };
-
-          formatter = pkgs.treefmt;
-
-          devshells.default = {
-            commands = [
-              {
-                name = "build";
-                category = "dev";
-                help = "Build the binary";
-                command = "make";
-              }
-            ];
-            packages = with pkgs; [
-              go_1_21
-              gopls
-              golangci-lint
-            ];
-            devshell.startup = {
-              pre-commit.text = config.pre-commit.installationScript;
-            };
-          };
-
-          treefmt = {
-            projectRootFile = "go.mod";
-            programs.gofmt.enable = true;
-            programs.nixpkgs-fmt.enable = true;
-          };
-
-          pre-commit = {
-            settings = {
-              hooks = {
-                treefmt.enable = true;
-              };
-            };
-          };
-        };
-    };
-}
diff --git a/templates/go/go.mod b/templates/go/go.mod
deleted file mode 100644
index d85760b..0000000
--- a/templates/go/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/fcuny/fixproject
-
-go 1.21
diff --git a/templates/go/main.go b/templates/go/main.go
deleted file mode 100644
index b5b1c7a..0000000
--- a/templates/go/main.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package main
-
-import "fmt"
-
-var (
-	Version, BuildDate string
-)
-
-func main() {
-	fmt.Println("hello world!")
-}