mirror of
https://github.com/sapphiregaze/discord-gorp.git
synced 2025-12-05 20:40:02 -08:00
Initial Project Setup:
- Setup golang project - Setup nix flake & envrc for development - Setup basic directory structure
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.direnv
|
||||||
5
cmd/discord-gorp/main.go
Normal file
5
cmd/discord-gorp/main.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
}
|
||||||
0
configs/config.yaml
Normal file
0
configs/config.yaml
Normal file
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1728018373,
|
||||||
|
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
|
||||||
|
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
|
||||||
|
"revCount": 688563,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.688563%2Brev-bc947f541ae55e999ffdb4013441347d83b00feb/01925b66-3b70-71bd-b277-924a6c208ba7/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
38
flake.nix
Normal file
38
flake.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
description = "A Nix-flake-based Go 1.22 development environment";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
goVersion = 22; # Change this to update the whole stack
|
||||||
|
|
||||||
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlays.default ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
go = final."go_1_${toString goVersion}";
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
# go (version is specified by overlay)
|
||||||
|
go
|
||||||
|
|
||||||
|
# goimports, godoc, etc.
|
||||||
|
gotools
|
||||||
|
|
||||||
|
# https://github.com/golangci/golangci-lint
|
||||||
|
golangci-lint
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
3
go.mod
Normal file
3
go.mod
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module github.com/sapphiregaze/discord-gorp
|
||||||
|
|
||||||
|
go 1.22.7
|
||||||
1
internal/daemon/daemon.go
Normal file
1
internal/daemon/daemon.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package daemon
|
||||||
1
pkg/config/loader.go
Normal file
1
pkg/config/loader.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package config
|
||||||
1
pkg/rpc/client.go
Normal file
1
pkg/rpc/client.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package rpc
|
||||||
Reference in New Issue
Block a user