feat(flake): modular structure with flake-file and flake-parts
This commit is contained in:
parent
4a576b32ff
commit
366e75c9d1
5 changed files with 149 additions and 8 deletions
19
flake/default.nix
Normal file
19
flake/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Flake
|
||||
|
||||
/**
|
||||
Entry point of NixOS configuration
|
||||
|
||||
- Defines external sources and locking their commit, which gives up __purity__.
|
||||
- Declares ready-to-use configurations (e.g. development shells, packages, etc.)
|
||||
|
||||
Essentially, `flake.nix` is like `Cargo.toml` in Rust or `package.json` in Node.js, but for an entire operating system.
|
||||
*/
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.flake-file.flakeModules.default ];
|
||||
|
||||
systems = inputs.nixpkgs.lib.systems.flakeExposed;
|
||||
|
||||
flake-file.inputs = import ./inputs;
|
||||
flake-file.outputs = "inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ./flake";
|
||||
flake-file.description = "A very basic flake";
|
||||
Loading…
Add table
Add a link
Reference in a new issue