Skip to content

Commit

Permalink
nix-darwin: fix evaluation with templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 17, 2024
1 parent eee831a commit f70b501
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions modules/nix-darwin/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, options, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

let
cfg = config.sops;
Expand All @@ -7,7 +7,10 @@ let
inherit cfg;
inherit (pkgs) writeTextFile;
};
manifest = manifestFor "" regularSecrets {};
manifest = manifestFor "" regularSecrets regularTemplates {};

# Currently, all templates are "regular" (there's no support for `neededForUsers` for templates.)
regularTemplates = cfg.templates;

pathNotInStore = lib.mkOptionType {
name = "pathNotInStore";
Expand Down
3 changes: 2 additions & 1 deletion modules/nix-darwin/secrets-for-users/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
let
cfg = config.sops;
secretsForUsers = lib.filterAttrs (_: v: v.neededForUsers) cfg.secrets;
templatesForUsers = {}; # We do not currently support `neededForUsers` for templates.
manifestFor = pkgs.callPackage ../manifest-for.nix {
inherit cfg;
inherit (pkgs) writeTextFile;
};
withEnvironment = import ../with-environment.nix {
inherit cfg lib;
};
manifestForUsers = manifestFor "-for-users" secretsForUsers {
manifestForUsers = manifestFor "-for-users" secretsForUsers templatesForUsers {
secretsMountPoint = "/run/secrets-for-users.d";
symlinkPath = "/run/secrets-for-users";
};
Expand Down

0 comments on commit f70b501

Please sign in to comment.