updating flake and pinning to 22.05

This commit is contained in:
revol-xut 2022-11-18 17:51:09 +01:00
parent ba27089255
commit 231d82029d
No known key found for this signature in database
GPG key ID: 4F56FF7759627D07
5 changed files with 114 additions and 110 deletions

View file

@ -1,5 +1,6 @@
{
inputs = {
nixpkgs.url = github:nixpkgs/nixos/nixos-22.05;
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
fsr-infoscreen.url = github:fsr/infoscreen;

View file

@ -67,9 +67,9 @@
nmap
tcpdump
bat
dig
ethtool
iftop
dig
ethtool
iftop
ipcalc
iperf3
ipv6calc
@ -82,8 +82,8 @@
sysstat
tree
whois
exa
zsh
exa
zsh
];
}

View file

@ -61,7 +61,7 @@ in
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
}

View file

@ -1,39 +1,42 @@
{pkgs, lib, config, ...}:
{ pkgs, lib, config, ... }:
let
website = pkgs.fetchgit {
url = "ssh+git://git@github.com:fsr/fruitbasket.git";
rev = "1b380f3bfd48aae2a17aefbbdd0538f09b7d3bcf";
sha256 = "";
};
in {
in
{
services = {
nginx = {
virtualHosts = {
"stream.ifsr.de" = {
enableACME = true;
forceSSL = true;
locations."/" = let
"stream.ifsr.de" = {
enableACME = true;
forceSSL = true;
locations."/" =
let
cfg = config.services.owncast;
in {
in
{
proxyPass = "http://${toString cfg.listen}:${toString cfg.port}";
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;
};
};
}

View file

@ -6,12 +6,12 @@
"mediawiki/ldapprovider".owner = config.users.users.mediawiki.name;
};
# users.users.mediawiki.extraGroups = [ "postgres" ];
# users.users.mediawiki.extraGroups = [ "postgres" ];
nixpkgs.overlays = [
(final: prev: {
final.config.systemd.services.mediawiki-init.script = ''
final.config.systemd.services.mediawiki-init.script = ''
'';
'';
})
];
services = {
@ -21,99 +21,99 @@
passwordFile = config.sops.secrets."mediawiki/initial_admin".path;
database = {
type = "postgres";
# socket = "/run/postgresql";
# socket = "/run/postgresql";
user = "mediawiki";
name = "mediawiki";
host = "localhost";
port = 5432;
host = "localhost";
port = 5432;
passwordFile = config.sops.secrets."mediawiki/postgres".path;
};
# virtualHost = {
# hostName = "wiki.quitte.tassilo-tanneberger.de";
# adminAddr = "root@ifsr.de";
# forceSSL = true;
# enableACME = true;
# };
# virtualHost = {
# hostName = "wiki.quitte.tassilo-tanneberger.de";
# adminAddr = "root@ifsr.de";
# forceSSL = true;
# enableACME = true;
# };
virtualHost = {
hostName = "wiki.quitte.tassilo-tanneberger.de";
adminAddr = "root@ifsr.de";
#forceSSL = true;
#enableACME = true;
};
virtualHost = {
hostName = "wiki.quitte.tassilo-tanneberger.de";
adminAddr = "root@ifsr.de";
#forceSSL = true;
#enableACME = true;
};
virtualHost.listen = [
{
ip = "127.0.0.1";
port = 8080;
ssl = false;
}
];
virtualHost.listen = [
{
ip = "127.0.0.1";
port = 8080;
ssl = false;
}
];
extraConfig = ''
$wgDBport = "5432";
$wgDBmwschema = "mediawiki";
$wgDBport = "5432";
$wgDBmwschema = "mediawiki";
$wgDBserver = "localhost";
$wgDBname = "mediawiki";
$wgDBserver = "localhost";
$wgDBname = "mediawiki";
/////// $wgArticlePath = '/$1';
/////// $wgArticlePath = '/$1';
// $wgLogo = "https://www.c3d2.de/images/ck.png";
$wgEmergencyContact = "root@ifsr.de";
$wgPasswordSender = "root@ifsr.de";
$wgLanguageCode = "de";
// $wgLogo = "https://www.c3d2.de/images/ck.png";
$wgEmergencyContact = "root@ifsr.de";
$wgPasswordSender = "root@ifsr.de";
$wgLanguageCode = "de";
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['sysop']['interwiki'] = true;
$wgGroupPermissions['sysop']['userrights'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['sysop']['interwiki'] = true;
$wgGroupPermissions['sysop']['userrights'] = true;
define("NS_INTERN", 100);
define("NS_INTERN_TALK", 101);
define("NS_INTERN", 100);
define("NS_INTERN_TALK", 101);
$wgExtraNamespaces[NS_INTERN] = "Intern";
$wgExtraNamespaces[NS_INTERN_TALK] = "Intern_Diskussion";
$wgExtraNamespaces[NS_INTERN] = "Intern";
$wgExtraNamespaces[NS_INTERN_TALK] = "Intern_Diskussion";
$wgGroupPermissions['intern']['move'] = true;
$wgGroupPermissions['intern']['move-subpages'] = true;
$wgGroupPermissions['intern']['move-rootuserpages'] = true; // can move root userpages
$wgGroupPermissions['intern']['read'] = true;
$wgGroupPermissions['intern']['edit'] = true;
$wgGroupPermissions['intern']['createpage'] = true;
$wgGroupPermissions['intern']['createtalk'] = true;
$wgGroupPermissions['intern']['writeapi'] = true;
$wgGroupPermissions['intern']['upload'] = true;
$wgGroupPermissions['intern']['reupload'] = true;
$wgGroupPermissions['intern']['reupload-shared'] = true;
$wgGroupPermissions['intern']['minoredit'] = true;
$wgGroupPermissions['intern']['purge'] = true; // can use ?action=purge without clicking "ok"
$wgGroupPermissions['intern']['sendemail'] = true;
$wgGroupPermissions['intern']['move'] = true;
$wgGroupPermissions['intern']['move-subpages'] = true;
$wgGroupPermissions['intern']['move-rootuserpages'] = true; // can move root userpages
$wgGroupPermissions['intern']['read'] = true;
$wgGroupPermissions['intern']['edit'] = true;
$wgGroupPermissions['intern']['createpage'] = true;
$wgGroupPermissions['intern']['createtalk'] = true;
$wgGroupPermissions['intern']['writeapi'] = true;
$wgGroupPermissions['intern']['upload'] = true;
$wgGroupPermissions['intern']['reupload'] = true;
$wgGroupPermissions['intern']['reupload-shared'] = true;
$wgGroupPermissions['intern']['minoredit'] = true;
$wgGroupPermissions['intern']['purge'] = true; // can use ?action=purge without clicking "ok"
$wgGroupPermissions['intern']['sendemail'] = true;
$wgNamespacePermissionLockdown[NS_INTERN]['*'] = array('intern');
$wgNamespacePermissionLockdown[NS_INTERN_TALK]['*'] = array('intern');
$wgNamespacePermissionLockdown[NS_INTERN]['*'] = array('intern');
$wgNamespacePermissionLockdown[NS_INTERN_TALK]['*'] = array('intern');
$wgGroupPermissions['sysop']['deletelogentry'] = true;
$wgGroupPermissions['sysop']['deleterevision'] = true;
$wgGroupPermissions['sysop']['deletelogentry'] = true;
$wgGroupPermissions['sysop']['deleterevision'] = true;
wfLoadExtension('ConfirmEdit/QuestyCaptcha');
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array( 'question' => 'How is C3D2 logo in ascii?', 'answer' => '<<</>>' );
wfLoadExtension('ConfirmEdit/QuestyCaptcha');
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array( 'question' => 'How is C3D2 logo in ascii?', 'answer' => '<<</>>' );
$wgEnableAPI = true;
$wgAllowUserCss = true;
$wgUseAjax = true;
$wgEnableMWSuggest = true;
$wgEnableAPI = true;
$wgAllowUserCss = true;
$wgUseAjax = true;
$wgEnableMWSuggest = true;
//TODO what about $wgUpgradeKey ?
//TODO what about $wgUpgradeKey ?
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoDefaultEngine = 'luastandalone';
# LDAP
$LDAPProviderDomainConfigs = "${config.sops.secrets."mediawiki/ldapprovider".path}";
$wgPluggableAuth_EnableLocalLogin = true;
# LDAP
$LDAPProviderDomainConfigs = "${config.sops.secrets."mediawiki/ldapprovider".path}";
$wgPluggableAuth_EnableLocalLogin = true;
'';
extensions = {
#Cite = pkgs.fetchzip {
@ -175,10 +175,10 @@
enable = true;
ensureUsers = [
{
name = "mediawiki";
ensurePermissions = {
"DATABASE \"mediawiki\"" = "ALL PRIVILEGES";
};
name = "mediawiki";
ensurePermissions = {
"DATABASE \"mediawiki\"" = "ALL PRIVILEGES";
};
}
];
ensureDatabases = [