-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathflake.nix
59 lines (51 loc) · 1.69 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = "Development environment and build process for a Hugo app with Python requirements";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
# Importing packages from nixpkgs
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # Allow unfree packages like VSCode if needed
};
mkDevShell = pkgs.mkShell {
packages = with pkgs; [
hugo # Hugo for building the website
vscode # VSCode for development
python312Packages.icalendar # Python packages
python312Packages.requests # Python packages
gnumake # GNU Make for build automation
];
shellHook = ''
export DIRENV_LOG_FORMAT=
echo "-----------------------"
echo "🌈 Your Hugo Dev Environment is ready."
echo "It provides hugo and vscode for use with the QGIS Website Project"
echo ""
echo "🪛 VSCode:"
echo "--------------------------------"
echo "Start vscode like this:"
echo ""
echo "./vscode.sh"
echo ""
echo "🪛 Hugo:"
echo "--------------------------------"
echo "Start Hugo like this:"
echo ""
echo "hugo server"
echo "-----------------------"
'';
};
in
{
devShells.x86_64-linux.default = mkDevShell;
packages = {
x86_64-linux = {
qgis-website = pkgs.callPackage ./package.nix {};
};
};
};
}