2022-05-02 23:31:45 +02:00
|
|
|
{ lib, config, pkgs, ... }:
|
2021-08-19 18:14:15 +02:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.magic_rb.secret = mkOption {
|
|
|
|
description = ''
|
|
|
|
Magic_RB's secret sause.
|
|
|
|
'';
|
|
|
|
type = types.unspecified;
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
_module.args.secret = config.magic_rb.secret;
|
|
|
|
|
|
|
|
magic_rb.secret =
|
|
|
|
let
|
|
|
|
secret = "${config.magic_rb.pins.secret}/default.nix";
|
|
|
|
modules = evalModules
|
|
|
|
{ modules =
|
|
|
|
[ ./wireguard.nix
|
|
|
|
./network.nix
|
|
|
|
./password-hashes.nix
|
2021-10-18 00:13:22 +02:00
|
|
|
./mounts.nix
|
2021-11-08 22:01:07 +01:00
|
|
|
./emacs.nix
|
2022-05-02 23:31:45 +02:00
|
|
|
({...}:
|
|
|
|
{ _module.args.pkgs = pkgs; })
|
2021-08-19 18:14:15 +02:00
|
|
|
] ++
|
2021-10-05 21:47:30 +02:00
|
|
|
(if (builtins.tryEval { x = import secret; }).success then
|
2021-08-19 18:14:15 +02:00
|
|
|
[ secret ]
|
|
|
|
else
|
|
|
|
builtins.trace "Warning! Not loading any secrets, you may get errors." []
|
|
|
|
);
|
|
|
|
};
|
|
|
|
in
|
|
|
|
modules.config;
|
|
|
|
};
|
|
|
|
}
|