Add weechat
This commit is contained in:
parent
2a3f5574cf
commit
393ad37da8
|
@ -18,6 +18,7 @@ imports = [
|
|||
./modules/home-options.nix
|
||||
./modules/eventd.nix
|
||||
./modules/unlock.nix
|
||||
./modules/weechat.nix
|
||||
../common/private-options.nix
|
||||
../common/secret
|
||||
# ./sort-mail.nix
|
||||
|
|
46
home-manager/modules/weechat.nix
Normal file
46
home-manager/modules/weechat.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
in {
|
||||
|
||||
options.m-0.weechat = {
|
||||
enable = mkEnableOption "Weechat";
|
||||
channels = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
pw = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.m-0.weechat.enable {
|
||||
systemd.user.services = {
|
||||
weechat = {
|
||||
Unit = {
|
||||
Description = "Weechat IRC Client (in tmux)";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L weechat -2 new-window -kt irc:0 '${pkgs.weechat}/bin/weechat'";
|
||||
ExecStop = "${pkgs.tmux}/bin/tmux -L weechat kill-window -t irc:0";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
weechat-tmux = {
|
||||
Unit = {
|
||||
Description = "Weechat Tmux Session";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L weechat -2 new-window -d -s irc -n 'bash' '${pkgs.zsh}/bin/zsh'";
|
||||
ExecStop = "${pkgs.tmux}/bin/tmux -L weechat kill-window -t irc";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue