Start migrating config to NixOS modules

This commit is contained in:
Paul-Henri Froidmont 2022-09-16 01:29:46 +02:00
parent c1211cb4e5
commit c0d929be0b
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
11 changed files with 283 additions and 183 deletions

View file

@ -1,5 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.custom.services.dokuwiki;
configureWiki = name: {
sops.secrets."usersFile-${name}" = {
@ -25,7 +28,20 @@ let
};
};
in
lib.mkMerge [
(configureWiki "anderia")
(configureWiki "arkadia")
]
{
options.custom.services.dokuwiki = {
enable = mkEnableOption "dokuwiki";
secretKeyFile = mkOption {
type = types.path;
};
};
config = mkIf cfg.enable
(lib.mkMerge [
(configureWiki "anderia")
(configureWiki "arkadia")
]);
}