In part 1, you’re using the anti-pattern of import nixpkgs
. Maybe update it to pkgs = nixpkgs.legacyPackages.${system}
. See also: 1000 instances of nixpkgs
You may also want to link to the second part from part 1. Right now it looks like it’s just not finished.