forked from Fachschaft/nixConfig
linting and formatting existing code
This commit is contained in:
parent
0dd73e6adb
commit
238faa3e89
12 changed files with 202 additions and 183 deletions
|
@ -1,47 +1,47 @@
|
|||
{lib, config, ...} :
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
cfg = config.impermanence;
|
||||
in
|
||||
in {
|
||||
imports = [];
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.impermanence = {
|
||||
enable = mkEnableOption "impermanence";
|
||||
storagePath = mkOption {
|
||||
type = types.path;
|
||||
default = "/persist";
|
||||
description = "The path where persistent data is stored";
|
||||
options.impermanence = {
|
||||
enable = mkEnableOption "impermanence";
|
||||
storagePath = mkOption {
|
||||
type = types.path;
|
||||
default = "/persist";
|
||||
description = "The path where persistent data is stored";
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "persist";
|
||||
description = "the name of the persistent data store";
|
||||
};
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "persist";
|
||||
description = "the name of the persistent data store";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.persistence.${cfg.name} = {
|
||||
persistentStoragePath = cfg.storagePath;
|
||||
directories = [
|
||||
"/var/log"
|
||||
"/var/lib/nixos"
|
||||
];
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
config = mkIf cfg.enable {
|
||||
environment.persistence.${cfg.name} = {
|
||||
persistentStoragePath = cfg.storagePath;
|
||||
directories = [
|
||||
"/var/log"
|
||||
"/var/lib/nixos"
|
||||
];
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
};
|
||||
environment.etc.machine-id.source = "${cfg.storagePath}/machine-id";
|
||||
};
|
||||
environment.etc.machine-id.source = "${cfg.storagePath}/machine-id";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
{pkgs, config, lib, modulesPath, ...}:
|
||||
let
|
||||
inherit (lib)
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkOption
|
||||
head;
|
||||
head
|
||||
;
|
||||
inherit (lib.types) str;
|
||||
cfg = config.services.mathebau-jitsi;
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [(modulesPath + "/services/web-apps/jitsi-meet.nix")];
|
||||
|
||||
|
||||
options.services.mathebau-jitsi = {
|
||||
enable = mkEnableOption "mathebau jitsi service";
|
||||
hostName = mkOption {
|
||||
|
@ -23,18 +28,25 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.jitsi-meet = {
|
||||
enable = true;
|
||||
hostName = cfg.hostName;
|
||||
config = {
|
||||
defaultLang = "de";
|
||||
services = {
|
||||
jitsi-meet = {
|
||||
enable = true;
|
||||
config = {
|
||||
defaultLang = "de";
|
||||
};
|
||||
inherit (cfg) hostName;
|
||||
};
|
||||
};
|
||||
services.jitsi-videobridge = {
|
||||
openFirewall = true;
|
||||
nat = {
|
||||
publicAddress = "130.83.2.184";
|
||||
localAddress = cfg.localAddress;
|
||||
jitsi-videobridge = {
|
||||
openFirewall = true;
|
||||
nat = {
|
||||
publicAddress = "130.83.2.184";
|
||||
inherit (cfg) localAddress;
|
||||
};
|
||||
};
|
||||
#We are behind a reverse proxy that handles TLS
|
||||
nginx.virtualHosts."${cfg.hostName}" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
};
|
||||
};
|
||||
environment.persistence.${config.impermanence.name} = {
|
||||
|
@ -43,13 +55,7 @@ in
|
|||
"/var/lib/prosody"
|
||||
];
|
||||
};
|
||||
#We are behind a reverse proxy that handles TLS
|
||||
services.nginx.virtualHosts."${cfg.hostName}" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
};
|
||||
|
||||
#The network ports for HTTP(S) are not opened automatically
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
#The network ports for HTTP(S) are not opened automatically
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue