feat: full rewrite of the website to use golang and a new design
This commit is contained in:
76
flake.nix
76
flake.nix
@@ -1,29 +1,61 @@
|
||||
{
|
||||
description = "learning.rs";
|
||||
description = "My development environment";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
templ.url = "github:a-h/templ?ref=v0.2.778";
|
||||
};
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = f:
|
||||
nixpkgs.lib.genAttrs systems (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
in
|
||||
f system pkgs);
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (system: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs_20
|
||||
];
|
||||
templ = system: inputs.templ.packages.${system}.templ;
|
||||
in {
|
||||
packages = forAllSystems (system: pkgs: let
|
||||
musl = pkgs.musl;
|
||||
derivation =
|
||||
pkgs.buildGoModule {
|
||||
};
|
||||
});
|
||||
};
|
||||
in {
|
||||
default = derivation;
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
CGO_ENABLED = "0";
|
||||
hardeningDisable = ["all"];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# Javascript tools
|
||||
eslint_d
|
||||
nodejs_22
|
||||
nodePackages_latest.eslint
|
||||
|
||||
# Go tools
|
||||
go
|
||||
gofumpt
|
||||
golangci-lint
|
||||
golines
|
||||
gotools
|
||||
delve
|
||||
(templ system)
|
||||
|
||||
# Sqlite tools
|
||||
sqlite
|
||||
lazysql
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user