From fffcb7f9bb07d30cd26b70e3ea5a1221337b59f0 Mon Sep 17 00:00:00 2001 From: atagen Date: Mon, 25 Aug 2025 00:59:57 +1000 Subject: [PATCH 1/4] fix callPackage for stable users --- default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index c3c89a3..7c61704 100644 --- a/default.nix +++ b/default.nix @@ -197,7 +197,9 @@ in after = [ "arbys-prep.service" ]; script = let - linker = lib.getExe (pkgs.smfh or (pkgs.rustPlatform.buildRustPackage ./smfh.nix { })); + linker = lib.getExe ( + pkgs.smfh or (pkgs.callPackage (pkgs.rustPlatform.buildRustPackage ./smfh.nix { })) + ); in '' new_manifest=${manifest} From a35e4f402e5028ca887341ccddc7ec263af4d028 Mon Sep 17 00:00:00 2001 From: atagen Date: Mon, 25 Aug 2025 00:59:57 +1000 Subject: [PATCH 2/4] fix callPackage for stable users --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.nix b/default.nix index c3c89a3..c2d1467 100644 --- a/default.nix +++ b/default.nix @@ -197,7 +197,7 @@ in after = [ "arbys-prep.service" ]; script = let - linker = lib.getExe (pkgs.smfh or (pkgs.rustPlatform.buildRustPackage ./smfh.nix { })); + linker = lib.getExe (pkgs.smfh or (pkgs.callPackage ./smfh.nix { })); in '' new_manifest=${manifest} From 9ff725bf68af009564dcee7de14847bde66b44b7 Mon Sep 17 00:00:00 2001 From: atagen Date: Mon, 25 Aug 2025 01:19:49 +1000 Subject: [PATCH 3/4] add support for smfh impure mode --- default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/default.nix b/default.nix index c2d1467..dfc91b2 100644 --- a/default.nix +++ b/default.nix @@ -92,6 +92,20 @@ in ''; }; enable = mkEnableOption "Arbitrary Symlink Manager"; + impure = mkOption { + type = bool; + default = false; + description = '' + Expand ~ and environment variables in paths, similar to if you were in a shell. + ''; + }; + variables = mkOption { + type = attrsOf str; + default = { }; + description = '' + A set of environment variables to use in the deployment. + ''; + }; }; files = mkOption { description = "Files to link"; @@ -146,6 +160,7 @@ in text = ( builtins.toJSON { inherit files; + inherit (config.envionrment.arbys) impure; clobber_by_default = config.environment.arbys.clobber; version = 1; } @@ -195,6 +210,7 @@ in "arbys-copy.service" ]; after = [ "arbys-prep.service" ]; + environment = config.environment.arbys.variables; script = let linker = lib.getExe (pkgs.smfh or (pkgs.callPackage ./smfh.nix { })); From 7679664811ff6cb609789d6f4e438d26ebad3a1a Mon Sep 17 00:00:00 2001 From: atagen Date: Mon, 25 Aug 2025 01:19:59 +1000 Subject: [PATCH 4/4] minor docs tweak --- default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index dfc91b2..0664728 100644 --- a/default.nix +++ b/default.nix @@ -39,7 +39,10 @@ let source = mkOption { type = nullOr (either path str); default = null; - description = "Path of the source file or directory - be sure to quote paths you don't want nix to copy to the store."; + 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 {