NixOS 20.09 Changes.
This commit is contained in:
parent
f77aedf9a5
commit
528fec2f0d
6 changed files with 35 additions and 34 deletions
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
mkIf (elem "fonts" config.machine.conffiles) {
|
||||
fonts = {
|
||||
enableFontDir = true;
|
||||
fontDir.enable = true;
|
||||
enableGhostscriptFonts = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
parted
|
||||
pciutils
|
||||
psmisc
|
||||
rfkill
|
||||
ripgrep
|
||||
rsync
|
||||
sysvtools
|
||||
|
@ -49,6 +48,7 @@
|
|||
telnet
|
||||
traceroute
|
||||
tree
|
||||
utillinux
|
||||
vim
|
||||
vulnix
|
||||
wget
|
||||
|
|
|
@ -19,33 +19,36 @@ mkIf (elem "gitea" config.machine.services) {
|
|||
name = "gitea";
|
||||
passwordFile = "${cfg.secretPath}/gitea_db";
|
||||
};
|
||||
extraConfig = ''
|
||||
[repository]
|
||||
DISABLE_HTTP_GIT = false
|
||||
USE_COMPAT_SSH_URI = true
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
COOKIE_USERNAME = gitea_username
|
||||
COOKIE_REMEMBER_NAME = gitea_userauth
|
||||
|
||||
[service]
|
||||
DISABLE_REGISTRATION = true
|
||||
'';
|
||||
settings = {
|
||||
repository = {
|
||||
DISABLE_HTTP_GIT = false;
|
||||
USE_COMPAT_SSH_URI = true;
|
||||
};
|
||||
|
||||
mysql = let
|
||||
cfg = config.services.gitea.database;
|
||||
in {
|
||||
ensureDatabases = [ cfg.name ];
|
||||
ensureUsers = [{
|
||||
name = cfg.user;
|
||||
ensurePermissions = {
|
||||
"${cfg.name}.*" = "ALL PRIVILEGES";
|
||||
security = {
|
||||
INSTALL_LOCK = true;
|
||||
COOKIE_USERNAME = "gitea_username";
|
||||
COOKIE_REMEMBER_NAME = "gitea_userauth";
|
||||
};
|
||||
}];
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = (lib.mkForce true);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# mysql = let
|
||||
# cfg = config.services.gitea.database;
|
||||
# in {
|
||||
# ensureDatabases = [ cfg.name ];
|
||||
# ensureUsers = [{
|
||||
# name = cfg.user;
|
||||
# ensurePermissions = {
|
||||
# "${cfg.name}.*" = "ALL PRIVILEGES";
|
||||
# };
|
||||
# }];
|
||||
# };
|
||||
};
|
||||
|
||||
users.users.git = {
|
||||
description = "Gitea Service";
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7bda4c4f110da5134ef9de5efe5d7e6f66bab6e6
|
||||
Subproject commit ee1ad50830b479ed8fb46c4c51d3bcdbc2184b8b
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -13,6 +13,7 @@ mkIf (elem "nextcloud" config.machine.services) {
|
|||
hostName = domain;
|
||||
https = true;
|
||||
maxUploadSize = "1024M";
|
||||
package = pkgs.nextcloud20;
|
||||
config = {
|
||||
adminuser = mkDefault (elemAt cfg.administrators 0).name;
|
||||
adminpassFile = "${cfg.secretPath}/nextcloud_admin";
|
||||
|
|
|
@ -2,12 +2,9 @@
|
|||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = let
|
||||
nextConf = import (lib.elemAt options.services.nextcloud.nginx.enable.declarations 0) { inherit config lib pkgs; };
|
||||
in {
|
||||
inherit ((elemAt nextConf.config.content.contents 2).content.services.nginx.virtualHosts.${config.services.nextcloud.hostName}) root extraConfig locations;
|
||||
if (config.services.nextcloud.enable == true) then {
|
||||
vHost = {
|
||||
enableACME = config.services.nextcloud.https;
|
||||
forceSSL = config.services.nextcloud.https;
|
||||
};
|
||||
}.vHost
|
||||
}.vHost else {}
|
||||
|
|
Loading…
Reference in a new issue