This commit is contained in:
Alexander Bantyev 2021-03-11 22:54:40 +03:00
parent a99394d8c1
commit 3331ee3bf1
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 13 additions and 23 deletions

View File

@ -6,12 +6,19 @@ let
}; };
}; };
in { in {
secrets-envsubst.weechat = { home-manager.users.balsoft = {
owner = "balsoft:users"; home.file.".weechat/python/autoload/notify_send.py".source =
secrets = [ "slack_api_token" ]; "${inputs.weechat-notify-send}/notify_send.py";
template = ''
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] [var]
python.slack.auto_open_threads = "true" python.slack.auto_open_threads = "false"
python.slack.background_load_all_history = "true" python.slack.background_load_all_history = "true"
python.slack.channel_name_typing_indicator = "true" python.slack.channel_name_typing_indicator = "true"
python.slack.color_buflist_muted_channels = "darkgray" python.slack.color_buflist_muted_channels = "darkgray"
@ -47,22 +54,6 @@ in {
python.slack.unfurl_ignore_alt_text = "false" python.slack.unfurl_ignore_alt_text = "false"
python.slack.unhide_buffers_with_activity = "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 = '' home.file.".weechat/weechat.conf".text = ''
# #

View File

@ -97,10 +97,9 @@
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH
function repl() { 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)" source="$(nix flake prefetch --json "$1" | ${pkgs.jq}/bin/jq -r .storePath)"
TEMP="$(mktemp --suffix=.nix)" 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" nix repl "$TEMP"
} }