Migrate to flake.parts
This commit is contained in:
parent
fbd7c1866f
commit
5505524dd4
2 changed files with 54 additions and 25 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -1,5 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749398372,
|
||||
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1750365781,
|
||||
|
@ -18,6 +38,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
|
58
flake.nix
58
flake.nix
|
@ -1,33 +1,41 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs = {
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
inherit (pkgs) callPackage;
|
||||
perSystem =
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs) callPackage;
|
||||
|
||||
commonPhpPackages = with pkgs; [
|
||||
phpactor
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [ nixd ];
|
||||
commonPhpPackages = with pkgs; [
|
||||
phpactor
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [ nixd ];
|
||||
};
|
||||
|
||||
nodejs = callPackage ./modules/nodejs.nix { };
|
||||
|
||||
php82 = callPackage ./modules/php82.nix { inherit commonPhpPackages; };
|
||||
|
||||
php83 = callPackage ./modules/php83.nix { inherit commonPhpPackages; };
|
||||
|
||||
tailwindcss = callPackage ./modules/tailwindcss.nix { };
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
|
||||
nodejs = callPackage ./modules/nodejs.nix { };
|
||||
|
||||
php82 = callPackage ./modules/php82.nix { inherit commonPhpPackages; };
|
||||
|
||||
php83 = callPackage ./modules/php83.nix { inherit commonPhpPackages; };
|
||||
|
||||
tailwindcss = callPackage ./modules/tailwindcss.nix { };
|
||||
};
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue