Compare commits

...

2 Commits

Author SHA1 Message Date
jolheiser 51cb9f3126
modernize flake
Signed-off-by: jolheiser <git@jolheiser.com>
2025-05-13 09:15:58 -05:00
jolheiser 60dc0dbc55
update flake
Signed-off-by: jolheiser <git@jolheiser.com>
2025-05-13 08:59:51 -05:00
2 changed files with 68 additions and 81 deletions

View File

@ -1,45 +1,28 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1728680019,
"narHash": "sha256-CoGRd1UPU14eJjBzv+z8ieaoJD+HU1muHELcfXyxuLA=",
"lastModified": 1747060738,
"narHash": "sha256-ByfPRQuqj+nhtVV0koinEpmJw0KLzNbgcgi9EF+NVow=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "09dae2b06e0d9cc30217c19930e83c077e4fa195",
"rev": "eaeed9530c76ce5f1d2d8232e08bec5e26f18ec1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1741037377,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=",
"lastModified": 1695806987,
"narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f",
"rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57",
"type": "github"
},
"original": {
@ -51,11 +34,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1741037377,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=",
"lastModified": 1699343069,
"narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f",
"rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d",
"type": "github"
},
"original": {
@ -67,27 +50,11 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"tailwind-ctp": "tailwind-ctp",
"tailwind-ctp-lsp": "tailwind-ctp-lsp"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tailwind-ctp": {
"inputs": {
"nixpkgs": "nixpkgs_2"

View File

@ -1,47 +1,67 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
tailwind-ctp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp";
tailwind-ctp-lsp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense";
};
outputs =
inputs:
let
systems = [
"x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-linux"
"armv6l-linux"
"armv7l-linux"
];
forAllSystems =
f:
inputs.nixpkgs.lib.genAttrs systems (
system:
f {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.self.overlays.default ];
};
}
);
in
{
self,
flake-utils,
nixpkgs,
tailwind-ctp,
tailwind-ctp-lsp,
}@inputs:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
tailwind-ctp = inputs.tailwind-ctp.packages.${system}.default;
tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${system}.default;
in
{
packages.default = pkgs.buildGoModule {
pname = "jolheiser.com";
version = "site";
src = ./.;
vendorHash = nixpkgs.lib.fileContents ./go.mod.sri;
nativeBuildInputs = [ tailwind-ctp ];
excludedPackages = ".";
postBuild = ''
go generate
mv dist $out
'';
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
go
tailwind-ctp
tailwind-ctp-lsp
vscode-langservers-extracted
];
};
}
);
overlays.default = final: prev: {
tailwind-ctp = inputs.tailwind-ctp.packages.${prev.system}.default;
tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${prev.system}.default;
};
packages = forAllSystems (
{ pkgs }:
{
default = pkgs.buildGoModule {
pname = "jolheiser.com";
version = "site";
src = ./.;
vendorHash = inputs.nixpkgs.lib.fileContents ./go.mod.sri;
nativeBuildInputs = [ inputs.tailwind-ctp ];
excludedPackages = ".";
postBuild = ''
go generate
mv dist $out
'';
};
}
);
devShells = forAllSystems (
{ pkgs }:
{
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
go
tailwind-ctp
tailwind-ctp-lsp
vscode-langservers-extracted
];
};
}
);
};
}