pub.solar/flake.nix
teutat3s 1aa49d739e
Use tritonshell instead of shell.nix
https://git.greenbaum.cloud/dev/tritonshell

Also don't source triton profile when starting tritonshell
by setting the TRITON_DONT_SOURCE_PROFILE env var
2022-10-20 16:11:53 +02:00

61 lines
2.3 KiB
Nix

{
description = "devs & ops environment for nix'ing with triton";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
devshell.inputs.flake-utils.follows = "flake-utils";
devshell.inputs.nixpkgs.follows = "nixpkgs";
tritonshell-module.url = "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main";
tritonshell-module.inputs.devshell.follows = "devshell";
tritonshell-module.inputs.flake-utils.follows = "flake-utils";
tritonshell-module.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, flake-utils, devshell, tritonshell-module, nixpkgs }:
flake-utils.lib.simpleFlake {
inherit self nixpkgs;
name = "infra-project";
preOverlays = [ devshell.overlay ];
shell = { pkgs }:
let
google-font-downloader = pkgs.writeShellScriptBin "google-font-downloader" ''
echo "Attempting to fetch $1"
${pkgs.nodejs}/bin/npx google-font-downloader -- $1
rm ./_includes/styles/typography.css
echo "/* To regenerate this file, run $ google-font-downloader '$1' */" >> ./_includes/styles/typography.css
echo "" >> ./_includes/styles/typography.css
cat ./google-fonts-*.css >> ./_includes/styles/typography.css
rm ./google-fonts-*.css
'';
in
pkgs.devshell.mkShell {
imports = [ tritonshell-module.devshellModules.x86_64-linux.tritonshell ];
# Now the tritonshell environment nix module options are available
environment = {
enable = true;
# CUSTOMIZE if desired, default options are:
#cnsBaseDomain = "greenbaum.zone";
#dataCenters = [ "cgn-1" "lev-1" ];
#mantaDomain = "eu-central.manta.greenbaum.cloud";
#tritonApiDomain = "api.greenbaum.cloud";
};
# Add additional packages you'd like to be available in your devshell
# PATH here
devshell.packages = with pkgs; [
deno
google-font-downloader
];
bash.extra = ''
export NVIM_USE_DENOLS=1
deno run -Ar https://deno.land/x/lume@v1.12.1/init.ts
'';
};
};
}