Initial commit
This commit is contained in:
commit
95ab35975a
27 changed files with 446 additions and 0 deletions
28
modules/sops.nix
Normal file
28
modules/sops.nix
Normal 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" = {};
|
||||
})
|
||||
]);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue