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": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1728680019, "lastModified": 1747060738,
"narHash": "sha256-CoGRd1UPU14eJjBzv+z8ieaoJD+HU1muHELcfXyxuLA=", "narHash": "sha256-ByfPRQuqj+nhtVV0koinEpmJw0KLzNbgcgi9EF+NVow=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "09dae2b06e0d9cc30217c19930e83c077e4fa195", "rev": "eaeed9530c76ce5f1d2d8232e08bec5e26f18ec1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1741037377, "lastModified": 1695806987,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=", "narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f", "rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -51,11 +34,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1741037377, "lastModified": 1699343069,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=", "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f", "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,27 +50,11 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"tailwind-ctp": "tailwind-ctp", "tailwind-ctp": "tailwind-ctp",
"tailwind-ctp-lsp": "tailwind-ctp-lsp" "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": { "tailwind-ctp": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"

View File

@ -1,40 +1,59 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
tailwind-ctp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp"; tailwind-ctp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp";
tailwind-ctp-lsp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense"; tailwind-ctp-lsp.url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense";
}; };
outputs = outputs =
{ inputs:
self,
flake-utils,
nixpkgs,
tailwind-ctp,
tailwind-ctp-lsp,
}@inputs:
flake-utils.lib.eachDefaultSystem (
system:
let let
pkgs = nixpkgs.legacyPackages.${system}; systems = [
tailwind-ctp = inputs.tailwind-ctp.packages.${system}.default; "x86_64-linux"
tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${system}.default; "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 in
{ {
packages.default = pkgs.buildGoModule { 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"; pname = "jolheiser.com";
version = "site"; version = "site";
src = ./.; src = ./.;
vendorHash = nixpkgs.lib.fileContents ./go.mod.sri; vendorHash = inputs.nixpkgs.lib.fileContents ./go.mod.sri;
nativeBuildInputs = [ tailwind-ctp ]; nativeBuildInputs = [ inputs.tailwind-ctp ];
excludedPackages = "."; excludedPackages = ".";
postBuild = '' postBuild = ''
go generate go generate
mv dist $out mv dist $out
''; '';
}; };
devShells.default = pkgs.mkShell { }
);
devShells = forAllSystems (
{ pkgs }:
{
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
go go
tailwind-ctp tailwind-ctp
@ -44,4 +63,5 @@
}; };
} }
); );
};
} }