Compare commits
No commits in common. "a6023abd2c12924a0b7a6bc1a441d8f518751921" and "fca50d0d554dd13f85e1dbc82a7fa88460ce2493" have entirely different histories.
a6023abd2c
...
fca50d0d55
|
@ -1,5 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "vdirsyncer-ensure-pass" (builtins.readFile ./vdirsyncer-ensure-pass.sh))
|
||||
];
|
||||
programs = {
|
||||
vdirsyncer.enable = true;
|
||||
khal = {
|
||||
|
@ -31,21 +34,15 @@
|
|||
type = "filesystem";
|
||||
fileExt = ".ics";
|
||||
};
|
||||
remote =
|
||||
let
|
||||
userName = "pixelifytica";
|
||||
in
|
||||
{
|
||||
inherit userName;
|
||||
remote = {
|
||||
url = "https://${url}";
|
||||
type = "caldav";
|
||||
userName = "pixelifytica";
|
||||
passwordCommand = [
|
||||
"${pkgs.libsecret}/bin/secret-tool"
|
||||
"lookup"
|
||||
"url"
|
||||
"${url}"
|
||||
"user"
|
||||
"${userName}"
|
||||
];
|
||||
};
|
||||
vdirsyncer = {
|
||||
|
|
5
system/home/calendar/vdirsyncer-ensure-pass.sh
Normal file
5
system/home/calendar/vdirsyncer-ensure-pass.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
URL="dav.xenia.me.uk"
|
||||
secret-tool lookup url "$URL" >/dev/null || (
|
||||
echo "Setup calendar password"
|
||||
secret-tool store --label="Personal calendar vdirsyncer" url "$URL"
|
||||
)
|
|
@ -19,14 +19,7 @@
|
|||
];
|
||||
file.${config.gtk.gtk2.configLocation}.force = true; # Stop clashing with KDE
|
||||
};
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
spotifyd = {
|
||||
enable = true;
|
||||
settings.global.username = "pixelifytica";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 57621 ]; # Spotify Connect
|
||||
services.syncthing.enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
|
||||
(pkgs.writeShellScriptBin "davmail-setup" ''
|
||||
systemctl --user restart davmail # Ensure config file is present
|
||||
systemctl --user stop davmail
|
||||
|
|
15
system/home/email/mbsync-ensure-pass.sh
Normal file
15
system/home/email/mbsync-ensure-pass.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
EMAIL_ADDRESSES=(
|
||||
e.litherlandsmith@proton.me
|
||||
e.litherlandsmith@icloud.com
|
||||
evie.litherland-smith@ukaea.uk
|
||||
)
|
||||
LABELS=("Proton" "iCloud" "Outlook")
|
||||
|
||||
for i in "${!EMAIL_ADDRESSES[@]}"; do
|
||||
ADDRESS="${EMAIL_ADDRESSES[$i]}"
|
||||
LABEL="${LABELS[$i]}"
|
||||
secret-tool lookup email "$ADDRESS" >/dev/null || (
|
||||
echo "Setup $LABEL"
|
||||
secret-tool store --label="$LABEL mail mbsync" email "$ADDRESS"
|
||||
)
|
||||
done
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "ensure-pass" (builtins.readFile ./shell/ensure-pass.sh))
|
||||
(pkgs.writeShellScriptBin "esync" (builtins.readFile ./shell/esync.sh))
|
||||
(pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh))
|
||||
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# Email
|
||||
ADDRESS="e.litherlandsmith@proton.me"
|
||||
secret-tool lookup email "$ADDRESS" >/dev/null || (
|
||||
echo "Insert pass from protonmail-bridge"
|
||||
secret-tool store --label="Proton Mail mbsync" email "$ADDRESS"
|
||||
)
|
||||
|
||||
ADDRESS="e.litherlandsmith@icloud.com"
|
||||
secret-tool lookup email "$ADDRESS" >/dev/null || (
|
||||
pass show identity/apple.com/mbsync |
|
||||
head -n1 |
|
||||
secret-tool store --label="iCloud mbsync" email "$ADDRESS"
|
||||
)
|
||||
|
||||
ADDRESS="evie.litherland-smith@ukaea.uk"
|
||||
secret-tool lookup email "$ADDRESS" >/dev/null || (
|
||||
pass show work/microsoftonline.com |
|
||||
head -n1 |
|
||||
secret-tool store --label="Outlook mbsync" email "$ADDRESS"
|
||||
)
|
||||
|
||||
# Calendar
|
||||
URL="dav.xenia.me.uk"
|
||||
USER="pixelifytica"
|
||||
secret-tool lookup url "$URL" user "$USER" >/dev/null || (
|
||||
pass show "server/xenia.me.uk/$URL" |
|
||||
head -n1 |
|
||||
secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER"
|
||||
)
|
||||
|
||||
# Spotify
|
||||
# See https://docs.spotifyd.rs/config/File.html for attribute details
|
||||
secret-tool lookup application rust-keyring service spotifyd username pixelifytica >/dev/null || (
|
||||
pass show media/spotify.com |
|
||||
head -n1 |
|
||||
secret-tool store --label="Spotify" application rust-keyring service spotifyd username pixelifytica
|
||||
)
|
Loading…
Reference in a new issue