1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

fix(weechat): do not delete secrets on startup

This commit is contained in:
2023-03-26 20:19:07 +02:00
parent 13e674389d
commit 22f957ee1f
3 changed files with 21 additions and 3 deletions

View File

@@ -157,7 +157,7 @@
*/ */
'' ''
${pkgs.coreutils}/bin/cp ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name} ${pkgs.coreutils}/bin/cp ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name}
${pkgs.coreutils}/bin/chmod +w "$CONFDIR"/${lib.escapeShellArg name} ${pkgs.coreutils}/bin/chmod -w "$CONFDIR"/${lib.escapeShellArg name}
'') '')
cfg.files cfg.files
) )

Submodule secrets updated: c77969c075...45acdffecb

View File

@@ -1,6 +1,7 @@
{ {
lib, lib,
pkgs, pkgs,
config,
... ...
}: let }: let
inherit (import ../../lib) kieran; inherit (import ../../lib) kieran;
@@ -63,6 +64,7 @@ in {
autojoin = ["#eloop" "#krebs" "#hsmr" "#hsmr-moin" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"]; autojoin = ["#eloop" "#krebs" "#hsmr" "#hsmr-moin" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"];
sasl_mechanism = "plain"; sasl_mechanism = "plain";
sasl_username = nick; sasl_username = nick;
sasl_password = "\${sec.data.hackint_sasl}";
}; };
libera = { libera = {
autoconnect = true; autoconnect = true;
@@ -71,12 +73,17 @@ in {
autojoin = ["#flipdot" "#haskell" "#nixos" "#fysi" "#binaergewitter" "#vim" "#newsboat"]; autojoin = ["#flipdot" "#haskell" "#nixos" "#fysi" "#binaergewitter" "#vim" "#newsboat"];
sasl_mechanism = "plain"; sasl_mechanism = "plain";
sasl_username = nick; sasl_username = nick;
sasl_password = "\${sec.data.libera_sasl}";
}; };
oftc = { oftc = {
autoconnect = true; autoconnect = true;
addresses = "irc.oftc.net/6697"; addresses = "irc.oftc.net/6697";
ssl = true; ssl = true;
ipv6 = true; ipv6 = true;
command = lib.concatStringsSep "\\;" [
"/msg nickserv identify \${sec.data.oftc_account}"
"/msg nickserv set cloak on"
];
autojoin = ["#home-manager"]; autojoin = ["#home-manager"];
}; };
retiolum = { retiolum = {
@@ -91,6 +98,7 @@ in {
]; ];
sasl_mechanism = "plain"; sasl_mechanism = "plain";
sasl_username = nick; sasl_username = nick;
sasl_password = "\${sec.data.retiolum_sasl}";
}; };
news = { news = {
autoconnect = true; autoconnect = true;
@@ -115,11 +123,13 @@ in {
matrix.server.nibbana = { matrix.server.nibbana = {
address = "nibbana.jp"; address = "nibbana.jp";
username = nick; username = nick;
password = "\${sec.data.nibbana_account}";
autoconnect = true; autoconnect = true;
}; };
alias.cmd.mod = "/quote omode $channel +o $nick"; alias.cmd.mod = "/quote omode $channel +o $nick";
relay = { relay = {
port.weechat = 9000; port.weechat = 9000;
network.password = "\${sec.data.relay_password}";
}; };
filters = { filters = {
zerocovid = { zerocovid = {
@@ -168,7 +178,7 @@ in {
restartIfChanged = true; restartIfChanged = true;
path = [pkgs.alacritty.terminfo]; path = [pkgs.alacritty.terminfo];
environment.WEECHAT_HOME = weechatHome; environment.WEECHAT_HOME = weechatHome;
preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf"; # preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat"; script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
preStop = "${tmux} kill-session -t IM"; preStop = "${tmux} kill-session -t IM";
serviceConfig = { serviceConfig = {
@@ -194,6 +204,14 @@ in {
packages = [pkgs.tmux]; packages = [pkgs.tmux];
}; };
age.secrets.weechat-sec = {
file = ../../secrets/weechat-sec.conf.age;
path = "/var/lib/weechat/sec.conf";
owner = "weechat";
group = "weechat";
mode = "440";
};
niveum.passport.services = [ niveum.passport.services = [
{ {
title = "weechat bouncer"; title = "weechat bouncer";