work
This commit is contained in:
parent
613f3ba9b4
commit
10fdec0768
88
flake.lock
88
flake.lock
|
@ -121,6 +121,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
|
@ -388,6 +404,42 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734435836,
|
||||||
|
"narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4989a246d7a390a859852baddb1013f825435cee",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"phps": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"nixpkgs": "nixpkgs_6",
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734905622,
|
||||||
|
"narHash": "sha256-3BwuhHKjfpTg/VnH0+uao3DqUmI1mowbLt3f+ysBwQM=",
|
||||||
|
"owner": "fossar",
|
||||||
|
"repo": "nix-phps",
|
||||||
|
"rev": "323d9eb87385473078ebdeef8873530c4f7dbbd7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "fossar",
|
||||||
|
"repo": "nix-phps",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
@ -395,7 +447,8 @@
|
||||||
"devenv-root": "devenv-root",
|
"devenv-root": "devenv-root",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5",
|
||||||
|
"phps": "phps"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
@ -412,6 +465,39 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
devenv.url = "github:cachix/devenv";
|
devenv.url = "github:cachix/devenv";
|
||||||
|
phps.url = "github:fossar/nix-phps";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
3
hosts/headful/work/envfs.nix
Normal file
3
hosts/headful/work/envfs.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.envfs.enable = true;
|
||||||
|
}
|
56
hosts/headful/work/php.nix
Normal file
56
hosts/headful/work/php.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
supportedPhps = [
|
||||||
|
"php72"
|
||||||
|
"php73"
|
||||||
|
"php74"
|
||||||
|
"php80"
|
||||||
|
"php81"
|
||||||
|
"php82"
|
||||||
|
"php83"
|
||||||
|
"php84"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nix.settings = {
|
||||||
|
substituters = ["https://fossar.cachix.org/"];
|
||||||
|
trusted-public-keys = ["fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
map (
|
||||||
|
phpName:
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = "with-${phpName}";
|
||||||
|
runtimeInputs = let
|
||||||
|
php = inputs.phps.packages.${pkgs.system}.${phpName}.buildEnv {
|
||||||
|
extensions = {
|
||||||
|
enabled,
|
||||||
|
all,
|
||||||
|
}:
|
||||||
|
enabled ++ [all.xdebug all.amqp];
|
||||||
|
extraConfig = ''
|
||||||
|
display_errors = On
|
||||||
|
error_reporting = E_ALL
|
||||||
|
|
||||||
|
memory_limit = -1
|
||||||
|
|
||||||
|
xdebug.mode = develop,coverage,gcstats,profile,debug,trace
|
||||||
|
xdebug.discover_client_host = 1
|
||||||
|
xdebug.client_host = localhost
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
php
|
||||||
|
php.packages.composer
|
||||||
|
pkgs.symfony-cli
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
exec "$@"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
||||||
|
supportedPhps;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.distrobox
|
pkgs.jetbrains.phpstorm
|
||||||
];
|
];
|
||||||
}
|
}
|
Loading…
Reference in a new issue