From cc6f1dda06fff5d6f5e6bc478aef03d429fb20d3 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 24 Feb 2026 16:10:01 -0500 Subject: [PATCH] callPackages and readme --- README.md | 5 +++++ callPackage/default.nix | 7 +++++++ callPackage/hello.nix | 7 +++++++ 3 files changed, 19 insertions(+) create mode 100644 README.md create mode 100644 callPackage/default.nix create mode 100644 callPackage/hello.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..020ea7b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# NixOS Tutorial +This is a working repo for learning how to develop in NixOS and configure systems. + +## Material +I'm currently following the tutorials at [Nix.dev](https://nix.dev/tutorials/) \ No newline at end of file diff --git a/callPackage/default.nix b/callPackage/default.nix new file mode 100644 index 0000000..51db9a5 --- /dev/null +++ b/callPackage/default.nix @@ -0,0 +1,7 @@ +let + pkgs = import { }; +in +rec{ + hello = pkgs.callPackage ./hello.nix { audience = "people"; }; + hello-folks = hello.override { audience = "folks"; }; +} \ No newline at end of file diff --git a/callPackage/hello.nix b/callPackage/hello.nix new file mode 100644 index 0000000..2dc0740 --- /dev/null +++ b/callPackage/hello.nix @@ -0,0 +1,7 @@ +{ + writeShellScriptBin, + audience ? "world", +}: +writeShellScriptBin "hello" '' + echo "Hello, ${audience}!" +'' \ No newline at end of file