Split flake.nix into separate flake-parts modules
This commit is contained in:
parent
c70e94ae27
commit
b4a233a20f
4 changed files with 121 additions and 33 deletions
25
flake-modules/dev-shell.nix
Normal file
25
flake-modules/dev-shell.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ inputs.devshell.flakeModule ];
|
||||||
|
|
||||||
|
perSystem.devshells.default =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
packages = with pkgs; [
|
||||||
|
nodePackages.browser-sync
|
||||||
|
|
||||||
|
(php83.buildEnv {
|
||||||
|
extraConfig = ''
|
||||||
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
|
||||||
|
php83Packages.composer
|
||||||
|
tailwindcss
|
||||||
|
|
||||||
|
(import ../drafts.nix { inherit pkgs; })
|
||||||
|
(import ../new-draft.nix { inherit pkgs; })
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
3
flake-modules/systems.nix
Normal file
3
flake-modules/systems.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
systems = [ "x86_64-linux" ];
|
||||||
|
}
|
85
flake.lock
generated
85
flake.lock
generated
|
@ -1,23 +1,94 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"devshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742422364,
|
"lastModified": 1741473158,
|
||||||
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
|
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
|
||||||
"owner": "nixos",
|
"owner": "numtide",
|
||||||
"repo": "nixpkgs",
|
"repo": "devshell",
|
||||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754487366,
|
||||||
|
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"import-tree": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752730890,
|
||||||
|
"narHash": "sha256-GES8fapSLGz36MMPRVNkSUWXUTtqvGQNXHjRmRLfJUY=",
|
||||||
|
"owner": "vic",
|
||||||
|
"repo": "import-tree",
|
||||||
|
"rev": "6ebb8cb87987b20264c09296166543fd3761d274",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "vic",
|
||||||
|
"repo": "import-tree",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755615617,
|
||||||
|
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753579242,
|
||||||
|
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"devshell": "devshell",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"import-tree": "import-tree",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
41
flake.nix
41
flake.nix
|
@ -1,31 +1,20 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs = {
|
||||||
|
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
devshell.url = "github:numtide/devshell";
|
||||||
|
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
|
import-tree.url = "github:vic/import-tree";
|
||||||
|
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ nixpkgs, ... }:
|
inputs:
|
||||||
let
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
system = "x86_64-linux";
|
imports = [
|
||||||
pkgs = import nixpkgs { inherit system; };
|
(inputs.import-tree ./flake-modules)
|
||||||
in
|
];
|
||||||
{
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
nodePackages.browser-sync
|
|
||||||
|
|
||||||
(php83.buildEnv {
|
|
||||||
extraConfig = ''
|
|
||||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
|
|
||||||
php83Packages.composer
|
|
||||||
tailwindcss
|
|
||||||
|
|
||||||
(import ./drafts.nix { inherit pkgs; })
|
|
||||||
(import ./new-draft.nix { inherit pkgs; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue