chore: cleanup
This commit is contained in:
parent
8aebb6aa2d
commit
3c5d553647
|
@ -86,9 +86,6 @@ in {
|
|||
inherit sopsFile owner mode;
|
||||
key = "restic-backup";
|
||||
};
|
||||
radicale-password = {
|
||||
inherit sopsFile owner mode;
|
||||
};
|
||||
openai-heygpt-api-key = {
|
||||
inherit sopsFile owner mode;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
restic-backup: ENC[AES256_GCM,data:3dNr6txxLDfK1zC3r7KM+kQqm9fUJ7VNkTtf45NxB4jCxO0=,iv:CVPsk6Z6jruqamj2EKIme3Y1F+Q6DOn1lP+2+04uGpk=,tag:p5rYvRjT6vz4kreEQHeYOg==,type:str]
|
||||
radicale-password: ENC[AES256_GCM,data:yGakoKG1zPceubbbhuE/KIV9hMOVDrI7oSQrTR3VB4k=,iv:2v2Wiw7Rwy94UU807RHs0MkVIYFlD1Y5pt/ipDgnypE=,tag:cXPn+kDsD3Zh2U/P3Z8mPg==,type:str]
|
||||
pw-mail-pm: ENC[AES256_GCM,data:v3EqEZyuy6r8qveDlq7t+UuyK7m2Zg==,iv:96HpxVd8bRubPVnQkZKXYgwTgzT9xFiOd2vFpcLhDq0=,tag:1kOuyK1EDdhZyzRuYCMfeA==,type:str]
|
||||
pw-mail-uni: ENC[AES256_GCM,data:CRZn0nNnwZRYETbpiWY=,iv:CAncz9DWCo89ffnLrRqCp6djV24ZFwC7KrdVi9w3p7A=,tag:/mw3lIuUWCeqwbo/15HjOA==,type:str]
|
||||
pw-mail-gmx: ENC[AES256_GCM,data:byvzb3zSVOHLjGzHwx43h0YhMoeDvUR2/g==,iv:tQEg751oi+LIjJ1dzW4Kv/irSgTCIuh2Fl4YQ0Pm6M8=,tag:1Uarz2dCkpTmJIh+/HYeEA==,type:str]
|
||||
|
@ -39,8 +38,8 @@ sops:
|
|||
U05rN3hQTFkxTHFDVnpZWGxNY25maFUKdrn4Jtqc9U9GXyRAPhHE8iyVFL5NvnrZ
|
||||
0KVOCWycdGVltDjTFVpyLoCiwZcTDDza/vjFcCro1zgcsdVuPl0orA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2023-12-12T11:48:30Z"
|
||||
mac: ENC[AES256_GCM,data:oBTR5BBuAOlNdcdkVI9pl3XKLZkAQMYLzqyI1f81izG7qL/dWO6F0PQqVxZwBcf7BQjlfRIXRjzVW41EFd85I1m2q1o+/2LWZY7a6qtuWe3nyNswrXI2q1uPInASfil9GX0Kht1pgy2WeSsjYOKGcGDTkHaAABfMRSfyT4DJRk4=,iv:j7XwHgPbtpFHzZLHv7L/oMLdIslNdSxcm4qUgse23w8=,tag:r9w1u5L8C7zx+Lq+wWNbvg==,type:str]
|
||||
lastmodified: "2024-01-09T19:32:39Z"
|
||||
mac: ENC[AES256_GCM,data:fYE40eekpqTzhmjQWlrNXN7E4ciz1qXnPepfrHy3xTrCec/PKjyrcDbXBZyE4/eUJDE5OQO1O2VU5fy/eXZ4ruh3k4jYK4cEWLAYF18RWcGx4Xs45AX+QwnHNbeEHZj1aPvjR0wH88LjK9zp1cdncwNyVuBSkp0mQxjGw+qHsRM=,iv:EUyRHLheeFfO3I35xc6medOBWBn1ul0R2tL5GeboH5M=,tag:aRaTxKEhTZO2tarchPiIvg==,type:str]
|
||||
pgp:
|
||||
- created_at: "2023-11-18T10:06:28Z"
|
||||
enc: |-
|
||||
|
|
|
@ -117,7 +117,6 @@ in {
|
|||
./hypr.nix
|
||||
./nb.nix
|
||||
../modules/restic-backup.nix
|
||||
../modules/synchronize-calendars.nix
|
||||
../modules/colors.nix
|
||||
];
|
||||
|
||||
|
@ -236,14 +235,6 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
# Configure calendar synchronization
|
||||
services.synchronize-calendars = {
|
||||
enable = true;
|
||||
user = "malte";
|
||||
passwordFile = nixosConfig.sops.secrets."radicale-password".path;
|
||||
defaultCalendar = "Malte";
|
||||
};
|
||||
|
||||
services.darkman = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -45,8 +45,6 @@ in {
|
|||
|
||||
# New nix3 stuff
|
||||
nsh = "nix shell nixpkgs#";
|
||||
nix-shell = "sl";
|
||||
nix-env = "sl";
|
||||
|
||||
sys = "systemctl";
|
||||
syss = "systemctl status";
|
||||
|
@ -67,33 +65,12 @@ in {
|
|||
g4 = "heygpt --model gpt-4-1106-preview";
|
||||
};
|
||||
shellAliases = {
|
||||
kal = "khal list (date '+%d.%m.%Y') (date --date='+1week' '+%d.%m.%Y')";
|
||||
# Prefix for date-based files/folders
|
||||
now = ''date +"%F-%T"'';
|
||||
f = "fend";
|
||||
};
|
||||
|
||||
functions = {
|
||||
at = ''
|
||||
set date (date --date="$argv" '+%d.%m.%Y')
|
||||
if test $status -eq 0
|
||||
khal list $date $date
|
||||
end
|
||||
'';
|
||||
flash-dongle = ''
|
||||
set output /dev/disk/by-id/usb-SanDisk_Extreme_AA011215151603543802-0:0
|
||||
if test ! -e $output
|
||||
echo "No dongle detected"
|
||||
exit 1
|
||||
end
|
||||
set input $argv[1]
|
||||
echo $input
|
||||
sudo dd if="$input" of=$output bs=1M status=progress
|
||||
'';
|
||||
flash-dongle-nixos = ''
|
||||
${pkgs.wget}/bin/wget -c "https://channels.nixos.org/nixos-unstable/latest-nixos-minimal-x86_64-linux.iso" -O /tmp/nixos.iso
|
||||
flash-dongle /tmp/nixos.iso
|
||||
'';
|
||||
to-image = ''
|
||||
wl-paste | silicon -f 'Hack Nerd Font FC Ligatured' --pad-horiz 40 --pad-vert 50 --theme gruvbox --shadow-blur-radius 30 -b '#ebdbb2' --shadow-color '#282828' --no-window-controls --output /tmp/image.png $argv && wl-copy < /tmp/image.png
|
||||
'';
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
# Synchronize calendars from https://cal.tammena.me
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.synchronize-calendars;
|
||||
|
||||
khalConfig = ''
|
||||
[calendars]
|
||||
|
||||
[[local]]
|
||||
path = ~/.local/share/calendars/*
|
||||
type = discover
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %d.%m.%Y
|
||||
longdateformat = %d.%m.%Y
|
||||
datetimeformat = %d.%m.%Y %H:%M
|
||||
longdatetimeformat = %d.%m.%Y %H:%M
|
||||
|
||||
[default]
|
||||
default_calendar = ${cfg.defaultCalendar}
|
||||
'';
|
||||
|
||||
vdirsyncerConfig = ''
|
||||
[general]
|
||||
status_path = "~/.local/state/vdirsyncer/status/"
|
||||
|
||||
[pair calendar]
|
||||
a = "calendar_local"
|
||||
b = "calendar_caltammenarocks"
|
||||
collections = ["from a", "from b"]
|
||||
conflict_resolution = "b wins"
|
||||
|
||||
metadata = ["displayname", "color"]
|
||||
|
||||
[storage calendar_local]
|
||||
type = "filesystem"
|
||||
path = "~/.local/share/calendars"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage calendar_caltammenarocks]
|
||||
type = "caldav"
|
||||
url = "https://cal.tammena.me/${cfg.user}/"
|
||||
username = "${cfg.user}"
|
||||
password.fetch = ["command", "${pkgs.coreutils}/bin/cat", "${cfg.passwordFile}"]
|
||||
|
||||
[pair contacts]
|
||||
a = "contacts_local"
|
||||
b = "contacts_caltammenarocks"
|
||||
collections = ["from a", "from b"]
|
||||
conflict_resolution = "b wins"
|
||||
|
||||
[storage contacts_local]
|
||||
type = "filesystem"
|
||||
path = "~/.local/share/contacts"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage contacts_caltammenarocks]
|
||||
type = "carddav"
|
||||
url = "https://cal.tammena.me/${cfg.user}"
|
||||
username = "${cfg.user}"
|
||||
password.fetch = ["command", "${pkgs.coreutils}/bin/cat", "${cfg.passwordFile}"]
|
||||
'';
|
||||
in {
|
||||
options.services.synchronize-calendars = with lib; {
|
||||
enable =
|
||||
mkEnableOption
|
||||
"Enable service to synchronize my calendars and add some necessary programs";
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
description = "Radicale user";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
description = "File containing the Radicale password for user";
|
||||
};
|
||||
|
||||
defaultCalendar = mkOption {
|
||||
type = types.str;
|
||||
description = "Default calendar to use in khal";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [pkgs.vdirsyncer];
|
||||
|
||||
# == Systemd settings to automatically run the sync ==
|
||||
systemd.user.services."synchronize-calendars" = {
|
||||
Unit.Description = "Synchronize my calendars using vdirsyncer";
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."synchronize-calendars" = {
|
||||
Unit.Description = "Run synchronize-calendars.service every 15 minutes";
|
||||
Timer.OnCalendar = "*:0/10";
|
||||
Install.WantedBy = ["timers.target"];
|
||||
};
|
||||
|
||||
# == Configuration ==
|
||||
xdg.configFile."khal/config".text = khalConfig;
|
||||
xdg.configFile."vdirsyncer/config".text = vdirsyncerConfig;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue