Initial commit
This commit is contained in:
commit
b882aea046
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1649676176,
|
||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1651495557,
|
||||
"narHash": "sha256-LtdjPfRx0JdMnNcViZ/NpqCX/v3HE7SP0P/Ipf2AVtk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2379d9d0595d269577187053b1cdfd1e0f731894",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
description = "Webdev flake";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils?rev=a4b154ebbdc88c8498a5c7b01589addc9e9cb678";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inputs = with pkgs; [
|
||||
nodejs nodePackages.npm nodePackages.yarn
|
||||
git gnupg vim less openssh
|
||||
];
|
||||
mkPhp = pkg: let php = pkg.buildEnv {
|
||||
extensions = { enabled, all }: enabled ++ [ all.imagick all.redis ];
|
||||
extraConfig = "memory_limit = 2G";
|
||||
}; in [ php php.packages.composer ];
|
||||
devShell = config: pkgs.mkShell {
|
||||
shellHook = ''
|
||||
cd $DEVSHELL_OLDPWD
|
||||
exec bwbox --profile dev zsh
|
||||
'';
|
||||
} // config;
|
||||
in {
|
||||
devShells = {
|
||||
php74 = devShell {
|
||||
buildInputs = inputs ++ (mkPhp pkgs.php74);
|
||||
};
|
||||
php80 = devShell {
|
||||
buildInputs = inputs ++ (mkPhp pkgs.php80);
|
||||
};
|
||||
php81 = devShell {
|
||||
buildInputs = inputs ++ (mkPhp pkgs.php81);
|
||||
};
|
||||
devops = devShell {
|
||||
buildInputs = with pkgs; inputs ++ [ ansible ];
|
||||
};
|
||||
ctf = devShell {
|
||||
buildInputs =
|
||||
let
|
||||
python = pkgs.python310.withPackages (p: with p; [
|
||||
requests
|
||||
pip
|
||||
setuptools
|
||||
]);
|
||||
in
|
||||
with pkgs; inputs ++ [ python curl ];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue