2022-09-04 08:04:56 -06:00
|
|
|
{ config, lib, pkgs, ... }:
|
2022-08-25 12:21:35 -06:00
|
|
|
with lib; {
|
|
|
|
options = {
|
|
|
|
nixManager = {
|
|
|
|
enable = mkEnableOption "Configure host as nix-conf manager.";
|
|
|
|
user = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "root";
|
|
|
|
description = ''
|
|
|
|
User who will own the private key.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.nixManager.enable {
|
|
|
|
sops.defaultSopsFile = config.xin-secrets.manager;
|
|
|
|
sops.secrets = {
|
|
|
|
manager_key = { owner = config.nixManager.user; };
|
|
|
|
manager_pubkey = { owner = config.nixManager.user; };
|
|
|
|
};
|
2022-09-04 08:04:56 -06:00
|
|
|
environment.systemPackages = with pkgs; [ microca ];
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
}
|