Implemented secure passwords
This commit is contained in:
parent
b36a86ed33
commit
2b6a8951e6
|
@ -1,4 +1,4 @@
|
||||||
# NixOps configuration for the VMs running Gitea
|
# NixOps configuration for the hosts running Gitea
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
@ -9,12 +9,18 @@
|
||||||
appName = "mcwhirter.io: Gitea Service"; # Give the site a name
|
appName = "mcwhirter.io: Gitea Service"; # Give the site a name
|
||||||
database = {
|
database = {
|
||||||
type = "postgres"; # Database type
|
type = "postgres"; # Database type
|
||||||
password = "gitea"; # Set the password
|
passwordFile = "/run/keys/gitea-dbpass"; # Where to find the password
|
||||||
};
|
};
|
||||||
domain = "source.mcwhirter.io"; # Domain name
|
domain = "source.mcwhirter.io"; # Domain name
|
||||||
rootUrl = "https://source.mcwhirter.io/"; # Root web URL
|
rootUrl = "https://source.mcwhirter.io/"; # Root web URL
|
||||||
httpPort = 3001; # Provided unique port
|
httpPort = 3001; # Provided unique port
|
||||||
extraConfig = ''
|
extraConfig = let
|
||||||
|
docutils =
|
||||||
|
pkgs.python37.withPackages (ps: with ps; [
|
||||||
|
docutils # Provides rendering of ReStructured Text files
|
||||||
|
pygments # Provides syntax highlighting
|
||||||
|
]);
|
||||||
|
in ''
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = "gitea@mcwhirter.io"
|
FROM = "gitea@mcwhirter.io"
|
||||||
|
@ -23,13 +29,16 @@
|
||||||
[markup.restructuredtext]
|
[markup.restructuredtext]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FILE_EXTENSIONS = .rst
|
FILE_EXTENSIONS = .rst
|
||||||
RENDER_COMMAND = /run/current-system/sw/bin/rst2html.py
|
RENDER_COMMAND = ${docutils}/bin/rst2html.py
|
||||||
IS_INPUT_FILE = false
|
IS_INPUT_FILE = false
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
|
authentication = ''
|
||||||
|
local gitea all ident map=gitea-users
|
||||||
|
'';
|
||||||
identMap = # Map the gitea user to postgresql
|
identMap = # Map the gitea user to postgresql
|
||||||
''
|
''
|
||||||
gitea-users gitea gitea
|
gitea-users gitea gitea
|
||||||
|
@ -53,13 +62,4 @@
|
||||||
"source.mcwhirter.io".email = "craige@mcwhirter.io";
|
"source.mcwhirter.io".email = "craige@mcwhirter.io";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
((
|
|
||||||
python37.withPackages (ps: with ps; [
|
|
||||||
docutils # Provides rendering of ReStructured Text files
|
|
||||||
pygments # Provides syntax highlighting
|
|
||||||
])
|
|
||||||
))
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue