git init
nix flake new -t github:jasonrm/nix-chips .
cat ./nix/devShells/user-hostname.nix \
| python3 -c 'import os,sys;[sys.stdout.write(os.path.expandvars(l)) for l in sys.stdin]' \
> ./nix/devShells/$(whoami)-$(hostname -s).nix
git add .
direnv allow
# setup secrets
arcanum edit secrets/project.env.age
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-staging.url = "github:jasonrm/nixpkgs-staging";
chips.url = "github:jasonrm/nix-chips";
chips.inputs.nixpkgs.follows = "nixpkgs";
chips.inputs.nixpkgs-staging.follows = "nixpkgs-staging";
};
outputs = {
self,
nixpkgs,
chips,
...
}:
chips.lib.use {
devShellsDir = ./nix/devShells;
packagesDir = ./nix/packages;
nixosModulesDir = ./nix/nixosModules;
dockerImagesDir = ./nix/dockerImages;
};
}
nix_direnv_manual_reload
use flake .#${USER}-$(hostname -s)
dotenv_if_exists .env.devshell
dotenv_if_exists .env.secrets
layout php
layout node
supervisord
# or, to see what will be started
supervisord-debug