mirror of
https://github.com/kmein/niveum
synced 2026-03-21 12:21:08 +01:00
Compare commits
4 Commits
8e19069d4c
...
40472e2ff8
| Author | SHA1 | Date | |
|---|---|---|---|
| 40472e2ff8 | |||
| a592947bbf | |||
| 444336cd19 | |||
| 6ef578d644 |
@@ -124,7 +124,7 @@ in {
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
us = "${pkgs.systemd}/bin/systemctl --user";
|
||||
wcd = "source ${wcd}";
|
||||
weechat = "${pkgs.openssh}/bin/ssh weechat@toum -t screen -x weechat-screen";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
where = "source ${where}";
|
||||
yt =
|
||||
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
||||
|
||||
@@ -48,6 +48,16 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeDashBin "mpv-simpsons" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
||||
|
||||
cat "${cacheLocation}/${indexFilename}" \
|
||||
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
|
||||
| shuf \
|
||||
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
|
||||
'')
|
||||
(pkgs.writeDashBin "flixmenu" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
|
||||
@@ -63,17 +63,20 @@ in {
|
||||
systemd.services.hu-vpn = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
conflicts = [ "openvpn-hu-berlin.service" ];
|
||||
script = ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn -c ${pkgs.writeText "hu-berlin.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
trusted-cert = e5a7d56543002ffe1e8962caa5fd6d94053aa702381458247b670877a66f3c6f
|
||||
trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359
|
||||
username = ${eduroam.identity}
|
||||
password = ${eduroam.password}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.openvpn-hu-berlin.conflicts = [ "hu-vpn.service" ];
|
||||
|
||||
services.openvpn.servers.hu-berlin = {
|
||||
autoStart = false;
|
||||
authUserPass = {
|
||||
|
||||
@@ -24,6 +24,7 @@ in {
|
||||
./autorenkalender.nix
|
||||
./proverb.nix
|
||||
./nachtischsatan.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
];
|
||||
|
||||
systemd.services.telegram-odyssey = {
|
||||
71
configs/weechat.nix
Normal file
71
configs/weechat.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{ pkgs, ... }:
|
||||
let inherit (import <niveum/lib>) kieran;
|
||||
in {
|
||||
systemd.services.weechat =
|
||||
let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
|
||||
set-option -g prefix `
|
||||
unbind-key C-b
|
||||
bind ` send-prefix
|
||||
|
||||
set-option -g status off
|
||||
set-option -g default-terminal screen-256color
|
||||
|
||||
#use session instead of windows
|
||||
bind-key c new-session
|
||||
bind-key p switch-client -p
|
||||
bind-key n switch-client -n
|
||||
bind-key C-s switch-client -l
|
||||
''} "$@"
|
||||
'';
|
||||
weechat = pkgs.weechat.override {
|
||||
configure = { ... }: {
|
||||
init = ''
|
||||
/set irc.server_default.nicks "kmein,kfm,kieran"
|
||||
/set irc.server_default.msg_part "tschö mit ö"
|
||||
/set irc.server_default.msg_quit "ciao kakao"
|
||||
/set irc.server_default.msg_kick "warum machst du diese?"
|
||||
/set irc.server_default.realname "${kieran.name}"
|
||||
/server add freenode chat.freenode.org
|
||||
/server add irc.r irc.r
|
||||
/server add news.r news.r
|
||||
/alias add mod /quote omode $channel +o $nick
|
||||
/set irc.server.freenode.autojoin "#krebs,##myengadin"
|
||||
/set irc.server.irc.r.autojoin "#xxx,#brockman"
|
||||
/set irc.server.news.r.autojoin "#drachengame,#memes,#all,#berlin"
|
||||
/set logger.level.irc.news.r.#all 0
|
||||
/filter addreplace corona irc.news.r.* * corona|covid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi
|
||||
/connect freenode
|
||||
/connect irc.r
|
||||
/connect news.r
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
description = "Weechat bouncer";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = false;
|
||||
path = [ pkgs.alacritty.terminfo ];
|
||||
environment.WEECHAT_HOME = "/var/lib/weechat";
|
||||
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
||||
preStop = "${tmux} kill-session -t IM";
|
||||
serviceConfig = {
|
||||
User = "weechat";
|
||||
RemainAfterExit = true;
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.weechat = {};
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
|
||||
createHome = true;
|
||||
group = "weechat";
|
||||
home = "/var/lib/weechat";
|
||||
isSystemUser = true;
|
||||
packages = [ pkgs.tmux ];
|
||||
};
|
||||
}
|
||||
@@ -14,6 +14,8 @@ in
|
||||
<niveum/configs/radio.nix>
|
||||
<niveum/configs/urlwatch.nix>
|
||||
<niveum/configs/gitea.nix>
|
||||
<niveum/configs/telegram-bots>
|
||||
<niveum/configs/weechat.nix>
|
||||
<niveum/configs/matterbridge.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
];
|
||||
@@ -62,5 +64,5 @@ in
|
||||
email = kieran.email;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.vim pkgs.git ];
|
||||
environment.systemPackages = [ pkgs.vim pkgs.git pkgs.tmux ];
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ let
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./telegram-bots
|
||||
# <niveum/configs/hass>
|
||||
<niveum/configs/distrobump.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
@@ -16,17 +15,6 @@ in {
|
||||
<niveum/configs/version.nix>
|
||||
<niveum/configs/traadfri.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
{
|
||||
services.rss-bridge.enable = true;
|
||||
}
|
||||
{
|
||||
services.weechat.enable = true;
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
nix.nixPath = [ "/var/src" ];
|
||||
|
||||
Reference in New Issue
Block a user