diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-01-19 21:14:51 +0100 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-01-19 21:14:51 +0100 |
commit | 9642cd7ae24f0ba79ce5647c709b35ae8f06a285 (patch) | |
tree | ae25c3b0db7ae4c23186b294c6d000073f085c2d /3 resources/nix/Flake.md | |
parent | 969b96c2531fb986f6c7f21fd544391b439defd7 (diff) |
vault backup: 2025-01-19 21:14:51
Diffstat (limited to '3 resources/nix/Flake.md')
-rw-r--r-- | 3 resources/nix/Flake.md | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/3 resources/nix/Flake.md b/3 resources/nix/Flake.md deleted file mode 100644 index 754556f..0000000 --- a/3 resources/nix/Flake.md +++ /dev/null @@ -1,22 +0,0 @@ -#nix #flake - ---- -Nix flakes are source trees containing a file `flake.nix` at their root. The file `flake.nix` provides a standardized way to provide [[Zettelkast/Index/Nix]] artifacts. It's like a package manager for [[Zettelkast/Index/Nix]]. A flake can be dependent on other Flakes and it's possible to pin dependencies to exact revisions by using a `flake.lock` file. - -Nix flake evaluation is hermetic, meaning that it produces the same result wherever it's built.k - -The feature can be enabled in `~/.config/nix/nix.conf`: - -``` -experimental-features = nix-command flakes -``` - -To initialize in a repo: `nix flake init`. - -In flakes dependencies have to be specified explicitly and MUST be locked to specific versions therefore it's no longer allowed to use the nixpkgs found in `NIX_PATH` by referencing it like `<nixpkgs>`. - -Output of a Flake is an arbitrary [[Zettelkast/Index/Nix]] value such as a package, [[NixOS]] module or library function. -Commands `nix build` and `nix shell` will build the output `packages.<system>.default` unless we specify another output, for example: `nix shell .#checks.aarch64-linux.build`. - ---- -[Flakes Wiki](https://nixos.wiki/wiki/Flakes)
\ No newline at end of file |