Initial commit
This commit is contained in:
commit
1ceaf7acff
26 changed files with 434 additions and 0 deletions
24
modules/sops.nix
Normal file
24
modules/sops.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ 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.secrets = lib.mkIf sops.enable (lib.mkMerge [
|
||||
{ sops.defaultSopsFile = ../secrets/secrets.yaml; }
|
||||
(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