Modularized configuration now kind of works. (still need to do some refactoring)
This commit is contained in:
parent
a0f361425a
commit
14332b2c7b
24 changed files with 144 additions and 85 deletions
|
@ -1,12 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
giteapwd = (builtins.replaceStrings ["\n"] [""] (builtins.readFile /secret/gitea));
|
||||
in {
|
||||
giteapwd = if config.services.gitea.enable then (builtins.readFile /secret/gitea) else "";
|
||||
in mkIf (elem "mariaDB" config.machine.services) {
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
initialDatabases = [ {
|
||||
initialDatabases = [ mkIf config.services.gitea.enable {
|
||||
name = "gitea";
|
||||
schema = pkgs.writeText "gitea.sql"
|
||||
''
|
||||
|
@ -16,3 +18,4 @@ in {
|
|||
} ];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue