From 3331ee3bf1f65af86a47579b48edb59cede8758c Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 11 Mar 2021 22:54:40 +0300 Subject: [PATCH] Weechat --- modules/applications/weechat.nix | 33 ++++++++++++-------------------- modules/workspace/zsh.nix | 3 +-- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/modules/applications/weechat.nix b/modules/applications/weechat.nix index c07eab6..ea15745 100644 --- a/modules/applications/weechat.nix +++ b/modules/applications/weechat.nix @@ -6,12 +6,19 @@ let }; }; in { - secrets-envsubst.weechat = { - owner = "balsoft:users"; - secrets = [ "slack_api_token" ]; - template = '' + home-manager.users.balsoft = { + home.file.".weechat/python/autoload/notify_send.py".source = + "${inputs.weechat-notify-send}/notify_send.py"; + + home.file.".weechat/perl/autoload/multiline.pl".source = + "${inputs.weechat-scripts}/perl/multiline.pl"; + + home.file.".weechat/python/autoload/go.py".source = + "${inputs.weechat-scripts}/python/go.py"; + + home.file.".weechat/plugins.conf".text = '' [var] - python.slack.auto_open_threads = "true" + python.slack.auto_open_threads = "false" python.slack.background_load_all_history = "true" python.slack.channel_name_typing_indicator = "true" python.slack.color_buflist_muted_channels = "darkgray" @@ -47,22 +54,6 @@ in { python.slack.unfurl_ignore_alt_text = "false" python.slack.unhide_buffers_with_activity = "false" ''; - }; - - home-manager.users.balsoft = { - home.file.".weechat/python/autoload/notify_send.py".source = - "${inputs.weechat-notify-send}/notify_send.py"; - - home.file.".weechat/perl/autoload/multiline.pl".source = - "${inputs.weechat-scripts}/perl/multiline.pl"; - - home.file.".weechat/python/autoload/go.py".source = - "${inputs.weechat-scripts}/python/go.py"; - - home.activation.weechat = '' - $DRY_RUN_CMD mkdir -p $HOME/.weechat - $DRY_RUN_CMD ln -sf $VERBOSE_ARG ${config.secrets-envsubst.weechat} $HOME/.weechat/plugins.conf - ''; home.file.".weechat/weechat.conf".text = '' # diff --git a/modules/workspace/zsh.nix b/modules/workspace/zsh.nix index 9c32d60..fc1bb3d 100755 --- a/modules/workspace/zsh.nix +++ b/modules/workspace/zsh.nix @@ -97,10 +97,9 @@ XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH function repl() { - flake_compat="$(nix flake prefetch --json github:edolstra/flake-compat | ${pkgs.jq}/bin/jq -r .storePath)" source="$(nix flake prefetch --json "$1" | ${pkgs.jq}/bin/jq -r .storePath)" TEMP="$(mktemp --suffix=.nix)" - echo "let self = (import $flake_compat { src = \"$source\"; }).defaultNix; in self // self.legacyPackages.\''${builtins.currentSystem} or { } // self.packages.\''${builtins.currentSystem} or { }" > "$TEMP" + echo "let self = builtins.getFlake \"$source\"; in self // self.legacyPackages.\''${builtins.currentSystem} or { } // self.packages.\''${builtins.currentSystem} or { }" > "$TEMP" nix repl "$TEMP" }