feat(flake): modular structure with flake-file and flake-parts

This commit is contained in:
Sk7Str1p3 2026-04-12 20:45:04 +03:00
parent 4a576b32ff
commit 366e75c9d1
No known key found for this signature in database
GPG key ID: 4DD995933D06D43B
5 changed files with 149 additions and 8 deletions

19
flake/default.nix Normal file
View 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";