tonybtw.com

tonybtw.com

https://git.tonybtw.com/tonybtw.com.git git://git.tonybtw.com/tonybtw.com.git
1,025 bytes raw
1
{
2
  description = "Dev shell for this tonybtw.com";
3
4
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5
6
  outputs = { nixpkgs, ... }:
7
    let
8
      systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
9
      foreach = f: builtins.listToAttrs (map (system: { name = system; value = f system; }) systems);
10
    in
11
    {
12
      devShells = foreach (system:
13
        let
14
          pkgs = import nixpkgs { inherit system; };
15
          common_pkgs = [ pkgs.hugo ];
16
        in
17
        {
18
          default = pkgs.mkShell {
19
            packages = common_pkgs;
20
            shellHook = ''
21
              export PS1="(tonybtw-dev) $PS1"
22
              echo "Hugo dev shell ready."
23
              hugo version
24
            '';
25
          };
26
          serve = pkgs.mkShell {
27
            packages = common_pkgs;
28
            shellHook = ''
29
              export PS1="(tonybtw-dev) $PS1"
30
              echo "Hugo dev shell ready."
31
              hugo serve
32
            '';
33
          };
34
        }
35
      );
36
    };
37
}