Migrate to flake-parts, remove justfile
Move the justfile recipes to devshell commands.
This commit is contained in:
parent
34cee8e678
commit
e642619988
3 changed files with 125 additions and 74 deletions
91
flake.nix
91
flake.nix
|
@ -1,45 +1,64 @@
|
|||
{
|
||||
inputs={
|
||||
inputs = {
|
||||
devshell.url = "github:numtide/devshell";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
opdavies-theme = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "path:./themes/opdavies";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, opdavies-theme, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
php = pkgs.php83.buildEnv {
|
||||
extraConfig = ''
|
||||
upload_max_filesize = 50M;
|
||||
post_max_size = 50M;
|
||||
'';
|
||||
};
|
||||
phpPackages = pkgs.php83Packages;
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
inputsFrom = [
|
||||
opdavies-theme.devShells.${system}.default
|
||||
];
|
||||
imports = [
|
||||
inputs.devshell.flakeModule
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
just
|
||||
lua-language-server
|
||||
lua54Packages.luacheck
|
||||
nixd
|
||||
php
|
||||
phpactor
|
||||
phpPackages.composer
|
||||
sqlite
|
||||
];
|
||||
};
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
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
|
||||
];
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
commands = [
|
||||
{
|
||||
name = "generate";
|
||||
command = "vendor/bin/drush tome:static --uri https://www.oliverdavies.uk";
|
||||
help = "Generate the static HTML";
|
||||
}
|
||||
|
||||
{
|
||||
name = "upload";
|
||||
command = ''
|
||||
generate
|
||||
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue