updating flake and pinning to 22.05
This commit is contained in:
parent
ba27089255
commit
231d82029d
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = github:nixpkgs/nixos/nixos-22.05;
|
||||||
sops-nix.url = github:Mic92/sops-nix;
|
sops-nix.url = github:Mic92/sops-nix;
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
fsr-infoscreen.url = github:fsr/infoscreen;
|
fsr-infoscreen.url = github:fsr/infoscreen;
|
||||||
|
|
|
@ -67,9 +67,9 @@
|
||||||
nmap
|
nmap
|
||||||
tcpdump
|
tcpdump
|
||||||
bat
|
bat
|
||||||
dig
|
dig
|
||||||
ethtool
|
ethtool
|
||||||
iftop
|
iftop
|
||||||
ipcalc
|
ipcalc
|
||||||
iperf3
|
iperf3
|
||||||
ipv6calc
|
ipv6calc
|
||||||
|
@ -82,8 +82,8 @@
|
||||||
sysstat
|
sysstat
|
||||||
tree
|
tree
|
||||||
whois
|
whois
|
||||||
exa
|
exa
|
||||||
zsh
|
zsh
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ in
|
||||||
|
|
||||||
# ensure that postgres is running *before* running the setup
|
# ensure that postgres is running *before* running the setup
|
||||||
systemd.services."nextcloud-setup" = {
|
systemd.services."nextcloud-setup" = {
|
||||||
requires = ["postgresql.service"];
|
requires = [ "postgresql.service" ];
|
||||||
after = ["postgresql.service"];
|
after = [ "postgresql.service" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +1,42 @@
|
||||||
{pkgs, lib, config, ...}:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
website = pkgs.fetchgit {
|
website = pkgs.fetchgit {
|
||||||
url = "ssh+git://git@github.com:fsr/fruitbasket.git";
|
url = "ssh+git://git@github.com:fsr/fruitbasket.git";
|
||||||
rev = "1b380f3bfd48aae2a17aefbbdd0538f09b7d3bcf";
|
rev = "1b380f3bfd48aae2a17aefbbdd0538f09b7d3bcf";
|
||||||
sha256 = "";
|
sha256 = "";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
nginx = {
|
nginx = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"stream.ifsr.de" = {
|
"stream.ifsr.de" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = let
|
locations."/" =
|
||||||
cfg = config.services.owncast;
|
let
|
||||||
in {
|
cfg = config.services.owncast;
|
||||||
|
in
|
||||||
|
{
|
||||||
proxyPass = "http://${toString cfg.listen}:${toString cfg.port}";
|
proxyPass = "http://${toString cfg.listen}:${toString cfg.port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
#streamConfig = ''
|
|
||||||
# server {
|
|
||||||
# listen 1935;
|
|
||||||
# proxy_pass [::1]:1935;
|
|
||||||
# proxy_buffer_size 32k;
|
|
||||||
#}
|
|
||||||
#'';
|
|
||||||
};
|
|
||||||
owncast = {
|
|
||||||
enable = true;
|
|
||||||
port = 13142;
|
|
||||||
listen = "[::ffff:127.0.0.1]";
|
|
||||||
openFirewall = true;
|
|
||||||
rtmp-port = 1935;
|
|
||||||
};
|
};
|
||||||
|
#streamConfig = ''
|
||||||
|
# server {
|
||||||
|
# listen 1935;
|
||||||
|
# proxy_pass [::1]:1935;
|
||||||
|
# proxy_buffer_size 32k;
|
||||||
|
#}
|
||||||
|
#'';
|
||||||
|
};
|
||||||
|
owncast = {
|
||||||
|
enable = true;
|
||||||
|
port = 13142;
|
||||||
|
listen = "[::ffff:127.0.0.1]";
|
||||||
|
openFirewall = true;
|
||||||
|
rtmp-port = 1935;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
158
modules/wiki.nix
158
modules/wiki.nix
|
@ -5,14 +5,14 @@
|
||||||
"mediawiki/initial_admin".owner = config.users.users.mediawiki.name;
|
"mediawiki/initial_admin".owner = config.users.users.mediawiki.name;
|
||||||
"mediawiki/ldapprovider".owner = config.users.users.mediawiki.name;
|
"mediawiki/ldapprovider".owner = config.users.users.mediawiki.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
# users.users.mediawiki.extraGroups = [ "postgres" ];
|
# users.users.mediawiki.extraGroups = [ "postgres" ];
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
final.config.systemd.services.mediawiki-init.script = ''
|
final.config.systemd.services.mediawiki-init.script = ''
|
||||||
|
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
services = {
|
services = {
|
||||||
mediawiki = {
|
mediawiki = {
|
||||||
|
@ -21,99 +21,99 @@
|
||||||
passwordFile = config.sops.secrets."mediawiki/initial_admin".path;
|
passwordFile = config.sops.secrets."mediawiki/initial_admin".path;
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
# socket = "/run/postgresql";
|
# socket = "/run/postgresql";
|
||||||
user = "mediawiki";
|
user = "mediawiki";
|
||||||
name = "mediawiki";
|
name = "mediawiki";
|
||||||
host = "localhost";
|
host = "localhost";
|
||||||
port = 5432;
|
port = 5432;
|
||||||
passwordFile = config.sops.secrets."mediawiki/postgres".path;
|
passwordFile = config.sops.secrets."mediawiki/postgres".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
# virtualHost = {
|
# virtualHost = {
|
||||||
# hostName = "wiki.quitte.tassilo-tanneberger.de";
|
# hostName = "wiki.quitte.tassilo-tanneberger.de";
|
||||||
# adminAddr = "root@ifsr.de";
|
# adminAddr = "root@ifsr.de";
|
||||||
# forceSSL = true;
|
# forceSSL = true;
|
||||||
# enableACME = true;
|
# enableACME = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
virtualHost = {
|
virtualHost = {
|
||||||
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
||||||
adminAddr = "root@ifsr.de";
|
adminAddr = "root@ifsr.de";
|
||||||
#forceSSL = true;
|
#forceSSL = true;
|
||||||
#enableACME = true;
|
#enableACME = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHost.listen = [
|
virtualHost.listen = [
|
||||||
{
|
{
|
||||||
ip = "127.0.0.1";
|
ip = "127.0.0.1";
|
||||||
port = 8080;
|
port = 8080;
|
||||||
ssl = false;
|
ssl = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$wgDBport = "5432";
|
$wgDBport = "5432";
|
||||||
$wgDBmwschema = "mediawiki";
|
$wgDBmwschema = "mediawiki";
|
||||||
|
|
||||||
$wgDBserver = "localhost";
|
$wgDBserver = "localhost";
|
||||||
$wgDBname = "mediawiki";
|
$wgDBname = "mediawiki";
|
||||||
|
|
||||||
|
|
||||||
/////// $wgArticlePath = '/$1';
|
/////// $wgArticlePath = '/$1';
|
||||||
|
|
||||||
// $wgLogo = "https://www.c3d2.de/images/ck.png";
|
// $wgLogo = "https://www.c3d2.de/images/ck.png";
|
||||||
$wgEmergencyContact = "root@ifsr.de";
|
$wgEmergencyContact = "root@ifsr.de";
|
||||||
$wgPasswordSender = "root@ifsr.de";
|
$wgPasswordSender = "root@ifsr.de";
|
||||||
$wgLanguageCode = "de";
|
$wgLanguageCode = "de";
|
||||||
|
|
||||||
$wgGroupPermissions['*']['edit'] = false;
|
$wgGroupPermissions['*']['edit'] = false;
|
||||||
$wgGroupPermissions['user']['edit'] = true;
|
$wgGroupPermissions['user']['edit'] = true;
|
||||||
$wgGroupPermissions['sysop']['interwiki'] = true;
|
$wgGroupPermissions['sysop']['interwiki'] = true;
|
||||||
$wgGroupPermissions['sysop']['userrights'] = true;
|
$wgGroupPermissions['sysop']['userrights'] = true;
|
||||||
|
|
||||||
define("NS_INTERN", 100);
|
define("NS_INTERN", 100);
|
||||||
define("NS_INTERN_TALK", 101);
|
define("NS_INTERN_TALK", 101);
|
||||||
|
|
||||||
$wgExtraNamespaces[NS_INTERN] = "Intern";
|
$wgExtraNamespaces[NS_INTERN] = "Intern";
|
||||||
$wgExtraNamespaces[NS_INTERN_TALK] = "Intern_Diskussion";
|
$wgExtraNamespaces[NS_INTERN_TALK] = "Intern_Diskussion";
|
||||||
|
|
||||||
$wgGroupPermissions['intern']['move'] = true;
|
$wgGroupPermissions['intern']['move'] = true;
|
||||||
$wgGroupPermissions['intern']['move-subpages'] = true;
|
$wgGroupPermissions['intern']['move-subpages'] = true;
|
||||||
$wgGroupPermissions['intern']['move-rootuserpages'] = true; // can move root userpages
|
$wgGroupPermissions['intern']['move-rootuserpages'] = true; // can move root userpages
|
||||||
$wgGroupPermissions['intern']['read'] = true;
|
$wgGroupPermissions['intern']['read'] = true;
|
||||||
$wgGroupPermissions['intern']['edit'] = true;
|
$wgGroupPermissions['intern']['edit'] = true;
|
||||||
$wgGroupPermissions['intern']['createpage'] = true;
|
$wgGroupPermissions['intern']['createpage'] = true;
|
||||||
$wgGroupPermissions['intern']['createtalk'] = true;
|
$wgGroupPermissions['intern']['createtalk'] = true;
|
||||||
$wgGroupPermissions['intern']['writeapi'] = true;
|
$wgGroupPermissions['intern']['writeapi'] = true;
|
||||||
$wgGroupPermissions['intern']['upload'] = true;
|
$wgGroupPermissions['intern']['upload'] = true;
|
||||||
$wgGroupPermissions['intern']['reupload'] = true;
|
$wgGroupPermissions['intern']['reupload'] = true;
|
||||||
$wgGroupPermissions['intern']['reupload-shared'] = true;
|
$wgGroupPermissions['intern']['reupload-shared'] = true;
|
||||||
$wgGroupPermissions['intern']['minoredit'] = true;
|
$wgGroupPermissions['intern']['minoredit'] = true;
|
||||||
$wgGroupPermissions['intern']['purge'] = true; // can use ?action=purge without clicking "ok"
|
$wgGroupPermissions['intern']['purge'] = true; // can use ?action=purge without clicking "ok"
|
||||||
$wgGroupPermissions['intern']['sendemail'] = true;
|
$wgGroupPermissions['intern']['sendemail'] = true;
|
||||||
|
|
||||||
$wgNamespacePermissionLockdown[NS_INTERN]['*'] = array('intern');
|
$wgNamespacePermissionLockdown[NS_INTERN]['*'] = array('intern');
|
||||||
$wgNamespacePermissionLockdown[NS_INTERN_TALK]['*'] = array('intern');
|
$wgNamespacePermissionLockdown[NS_INTERN_TALK]['*'] = array('intern');
|
||||||
|
|
||||||
$wgGroupPermissions['sysop']['deletelogentry'] = true;
|
$wgGroupPermissions['sysop']['deletelogentry'] = true;
|
||||||
$wgGroupPermissions['sysop']['deleterevision'] = true;
|
$wgGroupPermissions['sysop']['deleterevision'] = true;
|
||||||
|
|
||||||
wfLoadExtension('ConfirmEdit/QuestyCaptcha');
|
wfLoadExtension('ConfirmEdit/QuestyCaptcha');
|
||||||
$wgCaptchaClass = 'QuestyCaptcha';
|
$wgCaptchaClass = 'QuestyCaptcha';
|
||||||
$wgCaptchaQuestions[] = array( 'question' => 'How is C3D2 logo in ascii?', 'answer' => '<<</>>' );
|
$wgCaptchaQuestions[] = array( 'question' => 'How is C3D2 logo in ascii?', 'answer' => '<<</>>' );
|
||||||
|
|
||||||
$wgEnableAPI = true;
|
$wgEnableAPI = true;
|
||||||
$wgAllowUserCss = true;
|
$wgAllowUserCss = true;
|
||||||
$wgUseAjax = true;
|
$wgUseAjax = true;
|
||||||
$wgEnableMWSuggest = true;
|
$wgEnableMWSuggest = true;
|
||||||
|
|
||||||
//TODO what about $wgUpgradeKey ?
|
//TODO what about $wgUpgradeKey ?
|
||||||
|
|
||||||
$wgScribuntoDefaultEngine = 'luastandalone';
|
$wgScribuntoDefaultEngine = 'luastandalone';
|
||||||
|
|
||||||
# LDAP
|
# LDAP
|
||||||
$LDAPProviderDomainConfigs = "${config.sops.secrets."mediawiki/ldapprovider".path}";
|
$LDAPProviderDomainConfigs = "${config.sops.secrets."mediawiki/ldapprovider".path}";
|
||||||
$wgPluggableAuth_EnableLocalLogin = true;
|
$wgPluggableAuth_EnableLocalLogin = true;
|
||||||
'';
|
'';
|
||||||
extensions = {
|
extensions = {
|
||||||
#Cite = pkgs.fetchzip {
|
#Cite = pkgs.fetchzip {
|
||||||
|
@ -175,10 +175,10 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "mediawiki";
|
name = "mediawiki";
|
||||||
ensurePermissions = {
|
ensurePermissions = {
|
||||||
"DATABASE \"mediawiki\"" = "ALL PRIVILEGES";
|
"DATABASE \"mediawiki\"" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
ensureDatabases = [
|
ensureDatabases = [
|
||||||
|
|
Loading…
Reference in a new issue