mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Start migrating config to NixOS modules
This commit is contained in:
parent
c1211cb4e5
commit
c0d929be0b
11 changed files with 283 additions and 183 deletions
|
|
@ -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")
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue