From a00113edd596f0bad40269573999abd844ca82b5 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 18 Apr 2025 21:21:37 +0200 Subject: vault backup: 2025-04-18 21:21:37 --- Inheriting from sets.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Inheriting from sets.md (limited to 'Inheriting from sets.md') diff --git a/Inheriting from sets.md b/Inheriting from sets.md new file mode 100644 index 0000000..556f3d4 --- /dev/null +++ b/Inheriting from sets.md @@ -0,0 +1,29 @@ +--- +tags: + - nix + - programming +--- +```nix +let x = 123; in +{ + inherit x; + y = 456; +} +``` +== +```nix +let x = 123; in +{ + x = x; + y = 456; +} +``` + +Can reference set +```nix +inherit (src-set) a b c; +``` +== +```nix +a = src-set.a; b = src-set.b; c = src-set.c; +``` \ No newline at end of file -- cgit v1.2.3