From 8251efc384417fe125fbe28509a7dd2ef9d924b7 Mon Sep 17 00:00:00 2001 From: atagen Date: Mon, 21 Jul 2025 00:47:46 +1000 Subject: [PATCH 1/2] accept strings as source --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 43c5853..16d0295 100644 --- a/flake.nix +++ b/flake.nix @@ -43,9 +43,11 @@ bool nullOr lines + str path int attrsOf + either ; fileType = submodule ( { options, ... }: @@ -63,7 +65,7 @@ }; source = mkOption { - type = nullOr path; + type = nullOr (either path str); default = null; description = "Path of the source file or directory"; }; From ef34e2314b84b732618274c1940423ae19ebdf5e Mon Sep 17 00:00:00 2001 From: atagen Date: Thu, 24 Jul 2025 10:28:34 +1000 Subject: [PATCH 2/2] clarify .source usage in docs --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 16d0295..834db14 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ source = mkOption { type = nullOr (either path str); default = null; - description = "Path of the source file or directory"; + description = "Path of the source file or directory - be sure to quote paths you don't want nix to copy to the store."; }; executable = mkOption {