Fix mistakes with secrets

This commit is contained in:
Alexander Bantyev 2021-01-13 14:45:01 +03:00
parent f47fd37634
commit a72b99b32c
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 6 additions and 6 deletions

View File

@ -6,8 +6,8 @@
secrets = [ "user" "token" ]; secrets = [ "user" "token" ];
owner = "balsoft:users"; owner = "balsoft:users";
template = builtins.toJSON { template = builtins.toJSON {
yt-token = "$user"; yt-token = "$token";
user = "$token"; user = "$user";
from = { from = {
org = "/home/balsoft/Documents/serokell.org"; org = "/home/balsoft/Documents/serokell.org";
full-file = true; full-file = true;

View File

@ -44,8 +44,8 @@ in {
in '' in ''
interval=60 interval=60
markup=pango markup=pango
'' + genIniOrdered ([] '' + genIniOrdered (
# (scr "email") [ (scr "email") ]
++ [ (scrint "weather" 600) (scr "emacs") (scr "nixos") ] ++ [ (scrint "weather" 600) (scr "emacs") (scr "nixos") ]
++ [ (scrint "youtrack-wage" 3600) (scrint "music" 3) (scrint "sound" 1) ] ++ [ ++ [ (scrint "youtrack-wage" 3600) (scrint "music" 3) (scrint "sound" 1) ] ++ [
(scrint "cpu" 5) (scrint "cpu" 5)

View File

@ -1,8 +1,8 @@
{ python3, iconfont, config, ... }: '' { python3, iconfont, config, ... }: ''
#!${python3}/bin/python3 #!${python3}/bin/python3
import imaplib import imaplib
obj = imaplib.IMAP4_SSL('imap.${config.secrets.mail.host}', 993) obj = imaplib.IMAP4_SSL('balsoft.ru', 993)
obj.login("${config.secrets.mail.user}@${config.secrets.mail.host}", "${config.secrets.mail.password}") obj.login("balsoft@balsoft.ru", "${config.secrets.gnome-keyring-envsubst-email.decrypted}")
obj.select() obj.select()
l = len(obj.search(None, 'unseen')[1][0].split()) l = len(obj.search(None, 'unseen')[1][0].split())
if l == 0: if l == 0: