From 8eadec83dedfc65ed61efcd9f7442b0fe7964ac5 Mon Sep 17 00:00:00 2001 From: Jashandeep Sohi Date: Thu, 21 Dec 2023 11:56:48 -0800 Subject: [PATCH] update readme --- README.md | 65 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 80134c5..573166c 100644 --- a/README.md +++ b/README.md @@ -12,43 +12,46 @@ nix develop github:LCOGT/devenv-k8s --impure ### Import -Assuming you're using flake-parts, add the following to your `flake.nix`: +Assuming you are using flake-parts, add the following to your `flake.nix`: ```diff -diff --git a/flake.nix b/flake.nix -index 23e54fd..070e011 100644 ---- a/flake.nix -+++ b/flake.nix -@@ -5,10 +5,12 @@ - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - devenv.url = "github:cachix/devenv"; - nix2container.url = "github:nlewo/nix2container"; - nix2container.inputs.nixpkgs.follows = "nixpkgs"; - mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin"; -+ -+ devenv-k8s.url = "github:LCOGT/devenv-k8s"; - }; - - nixConfig = { - extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; - extra-substituters = "https://devenv.cachix.org"; -@@ -24,11 +26,11 @@ - perSystem = { config, self', inputs', pkgs, system, ... }: { - - devenv.shells.default = { - # https://devenv.sh/reference/options/ - packages = [ -- -+ inputs'.devenv-k8s.devShells.default - ]; - - }; - - }; +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + ++ devenv-k8s.url = "github:LCOGT/devenv-k8s"; + }; + + outputs = inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ ++ inputs.devenv-k8s.flakeModules.default + ]; + + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + + perSystem = { lib, config, ... }: { + ++ config.devenv.shells.default = { ++ # ... + }; + }; + }; +} ``` + Next `nix develop --impure`, it will install the packages & scripts in this devenv in addition to any project specific ones. +### Templates + +For a new project you can simply use one of the provided templates to get started: + +```sh +nix flake init -t github:LCOGT/devenv-k8s#app-repo +``` + ### Updates To pull in changes from upstream you need to run the following in the project that imports this: