NixOS 20.09 Changes.

This commit is contained in:
Kevin Baensch 2020-11-23 23:07:42 +01:00
parent f77aedf9a5
commit 528fec2f0d
Signed by: derped
GPG key ID: C0F1D326C7626543
6 changed files with 35 additions and 34 deletions

View file

@ -4,7 +4,7 @@ with lib;
mkIf (elem "fonts" config.machine.conffiles) {
fonts = {
enableFontDir = true;
fontDir.enable = true;
enableGhostscriptFonts = true;
fontconfig = {
enable = true;

View file

@ -41,7 +41,6 @@
parted
pciutils
psmisc
rfkill
ripgrep
rsync
sysvtools
@ -49,6 +48,7 @@
telnet
traceroute
tree
utillinux
vim
vulnix
wget

View file

@ -19,32 +19,35 @@ 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
'';
};
mysql = let
cfg = config.services.gitea.database;
in {
ensureDatabases = [ cfg.name ];
ensureUsers = [{
name = cfg.user;
ensurePermissions = {
"${cfg.name}.*" = "ALL PRIVILEGES";
settings = {
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 = (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 = {

@ -1 +1 @@
Subproject commit 7bda4c4f110da5134ef9de5efe5d7e6f66bab6e6
Subproject commit ee1ad50830b479ed8fb46c4c51d3bcdbc2184b8b

View file

@ -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";

View file

@ -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 {}