Skip to content

Commit

Permalink
Add environment.variables option
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Dec 26, 2024
1 parent 370fce7 commit 959774a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/environment/module.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ lib, ... }:

with lib;

{
options = {
environment.variables = mkOption {
type = types.attrsOf types.string;
default = {};
description = "Environment variables to set.";
};
};

config = {

};
}
2 changes: 2 additions & 0 deletions nix/evaluate-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ lib.evalModules {
modules = [
../modules/base.nix

../modules/environment/module.nix

../modules/exporters/module.nix

../modules/kernels/bash/module.nix
Expand Down
1 change: 1 addition & 0 deletions nix/makeEnvironment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ symlinkJoin {
++ lib.optionals (builtins.length exporters > 0) [(writeTextDir "lib/codedown/exporters.yaml" (lib.generators.toYAML {} exporters))]
++ attrValues evaluated.config.packages
++ lib.mapAttrsToList linkBinaries evaluated.config.extraBinDirs
++ [(writeTextDir "lib/codedown/.env" (lib.generators.toKeyValue {} evaluated.config.environment.variables))]
;

passthru = rec {
Expand Down

0 comments on commit 959774a

Please sign in to comment.