Merge pull request 'redmine migration' (#1) from import-redmine into master
Reviewed-on: https://codeberg.org/stura-htw-dresden/stura-infra/pulls/1
This commit is contained in:
commit
6085dd88d0
2 changed files with 49 additions and 79 deletions
|
|
@ -1,34 +1,60 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
"${modulesPath}/virtualisation/proxmox-lxc.nix"
|
||||||
];
|
];
|
||||||
|
system.stateVersion = "22.11";
|
||||||
|
|
||||||
networking.hostName = "redmine";
|
networking = {
|
||||||
networking.domain = "test.htw.stura-dresden.de";
|
hostName = "pro";
|
||||||
networking.interfaces.ens18.ipv4.addresses = [
|
domain = "htw.stura-dresden.de";
|
||||||
{
|
firewall.allowedTCPPorts = [
|
||||||
address = "141.56.51.1235";
|
80
|
||||||
prefixLength = 24;
|
443
|
||||||
}
|
];
|
||||||
];
|
};
|
||||||
networking.defaultGateway.address = "141.56.51.254";
|
|
||||||
|
|
||||||
security.acme.acceptTerms = true;
|
|
||||||
security.acme.defaults.email = "cert@stura.htw-dresden.de";
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
25
|
|
||||||
80
|
|
||||||
443
|
|
||||||
597
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
|
|
||||||
|
services = {
|
||||||
|
redmine = {
|
||||||
|
enable = true;
|
||||||
|
components.imagemagick = true;
|
||||||
|
components.minimagick_font_path = "${pkgs.liberation_ttf.outPath}/share/fonts/truetype/LiberationSans-Regular.ttf";
|
||||||
|
components.ghostscript = true;
|
||||||
|
settings.production.email_delivery = {
|
||||||
|
delivery_method = ":smtp";
|
||||||
|
smtp_settings = {
|
||||||
|
address = "mail.${config.networking.domain}";
|
||||||
|
port = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
logError = "/dev/null emerg";
|
||||||
|
appendHttpConfig = ''
|
||||||
|
access_log off;
|
||||||
|
'';
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"pro.htw.stura-dresden.de" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.services.redmine.port}";
|
||||||
|
};
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sda";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
boot = {
|
|
||||||
size = "1M";
|
|
||||||
type = "EF02"; # for grub MBR
|
|
||||||
};
|
|
||||||
ESP = {
|
|
||||||
priority = 1;
|
|
||||||
name = "ESP";
|
|
||||||
start = "1M";
|
|
||||||
end = "512M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [ "umask=0077" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
root = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = [ "-f" ]; # Override existing partition
|
|
||||||
subvolumes = {
|
|
||||||
"/rootfs" = {
|
|
||||||
mountpoint = "/";
|
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
mountOptions = [ "compress=zstd" ];
|
|
||||||
mountpoint = "/home";
|
|
||||||
};
|
|
||||||
# Sub(sub)volume doesn't need a mountpoint as its parent is mounted
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
mountpoint = "/nix";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue