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) {
|
mkIf (elem "fonts" config.machine.conffiles) {
|
||||||
fonts = {
|
fonts = {
|
||||||
enableFontDir = true;
|
fontDir.enable = true;
|
||||||
enableGhostscriptFonts = true;
|
enableGhostscriptFonts = true;
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
parted
|
parted
|
||||||
pciutils
|
pciutils
|
||||||
psmisc
|
psmisc
|
||||||
rfkill
|
|
||||||
ripgrep
|
ripgrep
|
||||||
rsync
|
rsync
|
||||||
sysvtools
|
sysvtools
|
||||||
|
@ -49,6 +48,7 @@
|
||||||
telnet
|
telnet
|
||||||
traceroute
|
traceroute
|
||||||
tree
|
tree
|
||||||
|
utillinux
|
||||||
vim
|
vim
|
||||||
vulnix
|
vulnix
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -19,33 +19,36 @@ mkIf (elem "gitea" config.machine.services) {
|
||||||
name = "gitea";
|
name = "gitea";
|
||||||
passwordFile = "${cfg.secretPath}/gitea_db";
|
passwordFile = "${cfg.secretPath}/gitea_db";
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
settings = {
|
||||||
[repository]
|
repository = {
|
||||||
DISABLE_HTTP_GIT = false
|
DISABLE_HTTP_GIT = false;
|
||||||
USE_COMPAT_SSH_URI = true
|
USE_COMPAT_SSH_URI = true;
|
||||||
|
|
||||||
[security]
|
|
||||||
INSTALL_LOCK = true
|
|
||||||
COOKIE_USERNAME = gitea_username
|
|
||||||
COOKIE_REMEMBER_NAME = gitea_userauth
|
|
||||||
|
|
||||||
[service]
|
|
||||||
DISABLE_REGISTRATION = true
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mysql = let
|
security = {
|
||||||
cfg = config.services.gitea.database;
|
INSTALL_LOCK = true;
|
||||||
in {
|
COOKIE_USERNAME = "gitea_username";
|
||||||
ensureDatabases = [ cfg.name ];
|
COOKIE_REMEMBER_NAME = "gitea_userauth";
|
||||||
ensureUsers = [{
|
|
||||||
name = cfg.user;
|
|
||||||
ensurePermissions = {
|
|
||||||
"${cfg.name}.*" = "ALL PRIVILEGES";
|
|
||||||
};
|
};
|
||||||
}];
|
|
||||||
|
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 = {
|
users.users.git = {
|
||||||
description = "Gitea Service";
|
description = "Gitea Service";
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7bda4c4f110da5134ef9de5efe5d7e6f66bab6e6
|
Subproject commit ee1ad50830b479ed8fb46c4c51d3bcdbc2184b8b
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ mkIf (elem "nextcloud" config.machine.services) {
|
||||||
hostName = domain;
|
hostName = domain;
|
||||||
https = true;
|
https = true;
|
||||||
maxUploadSize = "1024M";
|
maxUploadSize = "1024M";
|
||||||
|
package = pkgs.nextcloud20;
|
||||||
config = {
|
config = {
|
||||||
adminuser = mkDefault (elemAt cfg.administrators 0).name;
|
adminuser = mkDefault (elemAt cfg.administrators 0).name;
|
||||||
adminpassFile = "${cfg.secretPath}/nextcloud_admin";
|
adminpassFile = "${cfg.secretPath}/nextcloud_admin";
|
||||||
|
|
|
@ -2,12 +2,9 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
if (config.services.nextcloud.enable == true) then {
|
||||||
vHost = let
|
vHost = {
|
||||||
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;
|
|
||||||
enableACME = config.services.nextcloud.https;
|
enableACME = config.services.nextcloud.https;
|
||||||
forceSSL = config.services.nextcloud.https;
|
forceSSL = config.services.nextcloud.https;
|
||||||
};
|
};
|
||||||
}.vHost
|
}.vHost else {}
|
||||||
|
|
Loading…
Reference in a new issue