diff --git a/dev-flakes/web/flake.lock b/dev-flakes/web/flake.lock new file mode 100644 index 0000000..bf24a07 --- /dev/null +++ b/dev-flakes/web/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/dev-flakes/web/flake.nix b/dev-flakes/web/flake.nix index 8921ca7..5193b23 100644 --- a/dev-flakes/web/flake.nix +++ b/dev-flakes/web/flake.nix @@ -1,5 +1,5 @@ { - description = "General C++ dev enviroment"; + description = "Web dev + Go"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -15,34 +15,26 @@ }; in { - packages.default = pkgs.stdenv.mkDerivation { - pname = "myapp"; - version = "0.1.0"; - src = self; - - nativeBuildInputs = with pkgs; [ cmake ninja ]; - buildInputs = with pkgs; [ ]; - }; - - devShells.default = pkgs.mkShell { - name = "cpp-dev"; - - # In the dev shell, you get more tools than just what's needed to build + devShells.default = pkgs.mkShell { + # In the dev shell, you get more tools than just what's needed to build packages = with pkgs; [ + go + gopls + gotools + air + sqlite + sqlitebrowser gcc - clang - cmake - ninja - gdb - valgrind - clang-tools - ccache ]; + + # Variables + CGO_ENABLED = "1"; shellHook = '' - echo "C++ loaded" - export CC="ccache gcc" - export CXX="ccache g++" + echo "Go loaded" + echo "air -> Hot reload" + echo "sqlite3 app.db -> Inspect the DataBase" + export PORT="8080" ''; }; }); diff --git a/modules/common/ssh.nix b/modules/common/ssh.nix index ac65a79..a09f332 100644 --- a/modules/common/ssh.nix +++ b/modules/common/ssh.nix @@ -5,7 +5,9 @@ startAgent = true; extraConfig = '' Host github.com - IdentityFile ~/.ssh/github + IdentityFile ~/.ssh/git + Host git.alexdelcamp.fr + IdentityFile ~/.ssh/git ''; }; };