2025-04-16 18:18:17 +01:00
|
|
|
{
|
2025-06-03 23:35:21 +01:00
|
|
|
inputs = {
|
|
|
|
devshell.url = "github:numtide/devshell";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2025-05-29 11:11:06 +01:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
};
|
2025-04-16 18:18:17 +01:00
|
|
|
|
|
|
|
outputs =
|
2025-06-03 23:35:21 +01:00
|
|
|
inputs@{ flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } ({
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
inputs.devshell.flakeModule
|
|
|
|
];
|
|
|
|
|
|
|
|
perSystem =
|
2025-06-21 00:46:02 +01:00
|
|
|
{ pkgs, ... }:
|
2025-06-03 23:35:21 +01:00
|
|
|
let
|
|
|
|
php = pkgs.php83.buildEnv {
|
|
|
|
extraConfig = ''
|
|
|
|
upload_max_filesize = 50M;
|
|
|
|
post_max_size = 50M;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
phpPackages = pkgs.php83Packages;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devshells.default = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
just
|
|
|
|
lua-language-server
|
|
|
|
lua54Packages.luacheck
|
|
|
|
nixd
|
|
|
|
php
|
|
|
|
phpactor
|
|
|
|
phpPackages.composer
|
|
|
|
sqlite
|
2025-06-09 22:05:05 +01:00
|
|
|
tailwindcss_4
|
|
|
|
tailwindcss-language-server
|
2025-06-12 02:10:09 +01:00
|
|
|
watchman
|
2025-06-03 23:35:21 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
commands = [
|
|
|
|
{
|
|
|
|
name = "generate";
|
|
|
|
command = "vendor/bin/drush tome:static --uri https://www.oliverdavies.uk";
|
|
|
|
help = "Generate the static HTML";
|
|
|
|
}
|
2025-04-16 23:14:30 +01:00
|
|
|
|
2025-06-12 02:10:09 +01:00
|
|
|
{
|
|
|
|
name = "import";
|
|
|
|
command = "vendor/bin/drush tome:import";
|
|
|
|
help = "Re-import configuration, content and files";
|
|
|
|
}
|
|
|
|
|
2025-06-03 23:35:21 +01:00
|
|
|
{
|
|
|
|
name = "upload";
|
|
|
|
command = ''
|
|
|
|
generate
|
2025-05-29 11:11:06 +01:00
|
|
|
|
2025-06-03 23:35:21 +01:00
|
|
|
rsync -avzP html/ nixedo.oliverdavies.uk:/var/www/vhosts/website-tome \
|
|
|
|
--delete --delete-after
|
|
|
|
'';
|
|
|
|
help = "Generate the static HTML and upload it to the server";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2025-05-29 11:11:06 +01:00
|
|
|
|
2025-06-03 23:35:21 +01:00
|
|
|
formatter = pkgs.nixfmt-rfc-style;
|
|
|
|
};
|
|
|
|
});
|
2025-04-16 18:18:17 +01:00
|
|
|
}
|