Initial commit

This commit is contained in:
Aleksandr 2024-08-05 20:53:43 +03:00
commit 95ab35975a
27 changed files with 446 additions and 0 deletions

28
modules/sops.nix Normal file
View file

@ -0,0 +1,28 @@
{ lib, config, ... }:
let
sops = config.maid.sops;
in
{
options.maid.sops = {
enable = lib.mkEnableOption "sops";
work.enable = lib.mkEnableOption "work secrets";
viendesu.enable = lib.mkEnableOption "VienDesu! secrets";
};
config.sops = lib.mkIf sops.enable {
defaultSopsFile = ../secrets/secrets.yaml;
secrets =
lib.mkIf sops.enable (lib.mkMerge [
(lib.mkIf sops.work.enable {
"work/vpn/ovpn" = {};
"work/vpn/shadowsocks" = {};
"work/vpn/password" = {};
})
(lib.mkIf sops.viendesu.enable {
"shadowsocks/gneg" = {};
"shadowsocks/yor" = {};
})
]);
};
}