Modularize teams sops yazi

This commit is contained in:
DashieTM 2024-08-24 13:25:08 +02:00
parent 7730cbef59
commit c73cb37278
75 changed files with 3023 additions and 3573 deletions

30
modules/programs/sops.nix Normal file
View file

@ -0,0 +1,30 @@
{ lib, pkgs, config, options, ... }: {
options.mods.sops = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enable sops secrets";
};
};
config = lib.mkIf config.mods.sops.enable
(lib.optionalAttrs (options ? home.packages) {
home.packages = with pkgs; [ sops ];
sops = {
gnupg = {
home = "~/.gnupg";
sshKeyPaths = [ ];
};
defaultSopsFile = ../../secrets/secrets.yaml;
secrets = {
hub = { };
lab = { };
${config.conf.username} = { };
nextcloud = { };
access = { };
};
};
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
});
}