globally add sops

This commit is contained in:
Sakooooo 2023-10-06 10:12:16 +04:00
parent 3a52166bd7
commit c0e39fefd1
Signed by: sako
GPG key ID: 3FD715D87D7725E0
4 changed files with 29 additions and 0 deletions

View file

@ -107,6 +107,7 @@
};
security = {
age.enable = true;
sops.enable = true;
};
};
@ -122,6 +123,12 @@
};
security.pki.certificateFiles = [./trust/homelab.pem];
networking.wireguard.interfaces = {
wg0 = {
};
};
# Enable the OpenSSH daemon.
# services.openssh.enable = true;

View file

@ -1,5 +1,6 @@
{
imports = [
./age.nix
./sops.nix
];
}

21
modules/security/sops.nix Normal file
View file

@ -0,0 +1,21 @@
{
outputs,
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.security.age;
in {
options.modules.security.sops = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sops
];
};
}

View file