ok
This commit is contained in:
parent
9da2e27fa3
commit
61bd2f6c9f
4 changed files with 101 additions and 1 deletions
23
README.md
23
README.md
|
|
@ -1,3 +1,24 @@
|
||||||
# nix-environments
|
# nix-environments
|
||||||
|
|
||||||
some personal flakes
|
some personal flakes
|
||||||
|
|
||||||
|
# usage
|
||||||
|
|
||||||
|
### create a new dir
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix flake new -t https://git.elisiei.xyz:elisiei/nix-environments#ENV_HERE
|
||||||
|
```
|
||||||
|
|
||||||
|
### or init an existing dir
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix flake init -t https://git.elisiei.xyz:elisiei/nix-environments#ENV_HERE
|
||||||
|
```
|
||||||
|
|
||||||
|
# license
|
||||||
|
|
||||||
|
all original content and codes in this project is dedicated to the public domain under the
|
||||||
|
[Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
|
||||||
|
this grants you the freedom to use, modify, and distribute the content without any restrictions
|
||||||
|
or attribution requirements.
|
||||||
|
|
|
||||||
1
go/.envrc
Normal file
1
go/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
||||||
33
go/.gitignore
vendored
Normal file
33
go/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# If you prefer the allow list template instead of the deny list, see community template:
|
||||||
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
|
#
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Code coverage profiles and other test artifacts
|
||||||
|
*.out
|
||||||
|
coverage.*
|
||||||
|
*.coverprofile
|
||||||
|
profile.cov
|
||||||
|
|
||||||
|
# Dependency directories (remove the comment below to include it)
|
||||||
|
# vendor/
|
||||||
|
|
||||||
|
# Go workspace file
|
||||||
|
go.work
|
||||||
|
go.work.sum
|
||||||
|
|
||||||
|
# env file
|
||||||
|
.env
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
# Editor/IDE
|
||||||
|
# .idea/
|
||||||
|
# .vscode/
|
||||||
45
go/flake.nix
Normal file
45
go/flake.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
description = "minimal flake for go dev";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
inputs:
|
||||||
|
let
|
||||||
|
goVersion = 24;
|
||||||
|
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
forEachSupportedSystem =
|
||||||
|
f:
|
||||||
|
inputs.nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ inputs.self.overlays.default ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
go = final."go_1_${toString goVersion}";
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
go
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue