retrospace-website/flake.nix
2023-05-05 10:46:27 +02:00

61 lines
1.6 KiB
Nix

{
description = "Retrospace website development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
flake-utils.url = "github:numtide/flake-utils";
devshell = {
url = "github:numtide/devshell";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = { self, nixpkgs, flake-utils, devshell }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let
pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlays.default ];
};
in
pkgs.devshell.mkShell {
name = "Retrospace website development environment";
packages = with pkgs; [
(pkgs.ruby_3_1.withPackages
(ps: with ps; [
bundler
jekyll
kramdown-parser-gfm
webrick
])
)
nixpkgs-fmt
isort
];
env = [ ];
commands = [
{
name = "retrospace:lint";
category = "Maintenance";
help = "Lint all the files in project";
command = ''
nixpkgs-fmt *.nix
'';
}
{
name = "retrospace:deploy";
help = "Deploy the website";
command = ''
jekyll build && rsync -v -rz --checksum --delete ./_site/ endor:/var/www/retrospace.be
'';
}
];
};
});
}