From 26f336cf69a756a504acf2a553a2a751e44ad1b9 Mon Sep 17 00:00:00 2001 From: vdbe Date: Thu, 1 May 2025 15:49:36 +0200 Subject: [PATCH] clanCore/vars/sops: add sops & switch to builtins.path --- nixosModules/clanCore/vars/interface.nix | 21 +++++++------------ .../clanCore/vars/secret/sops/default.nix | 5 ++++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/nixosModules/clanCore/vars/interface.nix b/nixosModules/clanCore/vars/interface.nix index 03fbc8555..018295a8e 100644 --- a/nixosModules/clanCore/vars/interface.nix +++ b/nixosModules/clanCore/vars/interface.nix @@ -256,20 +256,15 @@ in ''; type = str; defaultText = '' - (pkgs.runCommandNoCCLocal "${generator.config._module.args.name}_${file.config._module.args.name}" - { } - ''\'' - cp $${file.config.inRepoPath} $out - ''\'' - ).outPath; + builtins.path { + name = "$${generator.config._module.args.name}_$${file.config._module.args.name}"; + path = file.config.inRepoPath; + } ''; - default = - (pkgs.runCommandNoCCLocal "${generator.config._module.args.name}_${file.config._module.args.name}" - { } - '' - cp ${file.config.flakePath} $out - '' - ).outPath; + default = builtins.path { + name = "${generator.config._module.args.name}_${file.config._module.args.name}"; + path = file.config.flakePath; + }; }; neededFor = lib.mkOption { description = '' diff --git a/nixosModules/clanCore/vars/secret/sops/default.nix b/nixosModules/clanCore/vars/secret/sops/default.nix index 51604e96d..79fd32531 100644 --- a/nixosModules/clanCore/vars/secret/sops/default.nix +++ b/nixosModules/clanCore/vars/secret/sops/default.nix @@ -49,7 +49,10 @@ in mode neededForUsers ; - sopsFile = secretPath secret; + sopsFile = builtins.path { + name = "${secret.generator}_${secret.name}"; + path = secretPath secret; + }; format = "binary"; }; }) (builtins.filter (x: builtins.pathExists (secretPath x)) vars)