mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: hello, FU!
This commit is contained in:
@@ -9,6 +9,13 @@
|
|||||||
realName = "Kierán Meinhardt";
|
realName = "Kierán Meinhardt";
|
||||||
folders.inbox = "INBOX";
|
folders.inbox = "INBOX";
|
||||||
};
|
};
|
||||||
|
fu-defaults = rec {
|
||||||
|
imap.host = "mail.zedat.fu-berlin.de";
|
||||||
|
smtp.host = imap.host;
|
||||||
|
folders.drafts = "Entwürfe";
|
||||||
|
folders.sent = "Gesendet";
|
||||||
|
folders.trash = "Papierkorb";
|
||||||
|
};
|
||||||
hu-defaults = {
|
hu-defaults = {
|
||||||
imap.host = "mailbox.cms.hu-berlin.de";
|
imap.host = "mailbox.cms.hu-berlin.de";
|
||||||
imap.port = 993;
|
imap.port = 993;
|
||||||
@@ -111,6 +118,15 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
accounts.email.accounts = rec {
|
accounts.email.accounts = rec {
|
||||||
|
fu-student =
|
||||||
|
lib.recursiveUpdate defaults
|
||||||
|
(lib.recursiveUpdate fu-defaults
|
||||||
|
rec {
|
||||||
|
userName = "meinhak99";
|
||||||
|
address = "kieran.meinhardt@fu-berlin.de";
|
||||||
|
aliases = ["${userName}@fu-berlin.de"];
|
||||||
|
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
|
||||||
|
});
|
||||||
hu-student =
|
hu-student =
|
||||||
lib.recursiveUpdate defaults
|
lib.recursiveUpdate defaults
|
||||||
(lib.recursiveUpdate hu-defaults
|
(lib.recursiveUpdate hu-defaults
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ in {
|
|||||||
./hledger.nix
|
./hledger.nix
|
||||||
./htop.nix
|
./htop.nix
|
||||||
./hu-berlin.nix
|
./hu-berlin.nix
|
||||||
|
./fu-berlin.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
./i3status-rust.nix
|
./i3status-rust.nix
|
||||||
./keyboard.nix
|
./keyboard.nix
|
||||||
|
|||||||
59
configs/fu-berlin.nix
Normal file
59
configs/fu-berlin.nix
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
username = "meinhak99";
|
||||||
|
in {
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.ssh = {
|
||||||
|
matchBlocks = {
|
||||||
|
fu-berlin = {
|
||||||
|
user = username;
|
||||||
|
hostname = "login.zedat.fu-berlin.de";
|
||||||
|
setEnv.TERM = "xterm";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.fu-blackboard-calendar = {
|
||||||
|
enable = true;
|
||||||
|
# startAt = "*:00/10";
|
||||||
|
after = ["vdirsyncer.service"];
|
||||||
|
wantedBy = ["default.target"];
|
||||||
|
script = ''
|
||||||
|
ics_url=$(cat "$CREDENTIALS_DIRECTORY/ics-url")
|
||||||
|
curl "$ics_url" | ${pkgs.khal}/bin/khal import -
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
Restart = "on-failure";
|
||||||
|
LoadCredential = "ics-url:${config.age.secrets.blackboard-calendar-ics.path}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
email-password-meinhak99 = {
|
||||||
|
file = ../secrets/email-password-meinhak99.age;
|
||||||
|
owner = config.users.users.me.name;
|
||||||
|
group = config.users.users.me.group;
|
||||||
|
mode = "400";
|
||||||
|
};
|
||||||
|
blackboard-calendar-ics = {
|
||||||
|
file = ../secrets/blackboard-calendar-ics.age;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.fu-vpn = {
|
||||||
|
enable = true;
|
||||||
|
wants = ["network-online.target"];
|
||||||
|
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhak99.path}";
|
||||||
|
script = ''
|
||||||
|
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||||
|
then
|
||||||
|
cat "$CREDENTIALS_DIRECTORY/password" | ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --user ${username} --passwd-on-stdin
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,12 +4,6 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.strings) fileContents;
|
|
||||||
inherit (import ../lib) sshPort;
|
|
||||||
eduroam = {
|
|
||||||
identity = fileContents <secrets/eduroam/identity>;
|
|
||||||
password = fileContents <secrets/eduroam/password>;
|
|
||||||
};
|
|
||||||
hu-berlin-cifs-options = [
|
hu-berlin-cifs-options = [
|
||||||
"uid=${toString config.users.users.me.uid}"
|
"uid=${toString config.users.users.me.uid}"
|
||||||
"gid=${toString config.users.groups.users.gid}"
|
"gid=${toString config.users.groups.users.gid}"
|
||||||
@@ -17,7 +11,6 @@
|
|||||||
"workgroup=german"
|
"workgroup=german"
|
||||||
"credentials=${config.age.secrets.cifs-credentials-hu-berlin.path}"
|
"credentials=${config.age.secrets.cifs-credentials-hu-berlin.path}"
|
||||||
"noauto"
|
"noauto"
|
||||||
# "x-systemd.requires=hu-vpn.service"
|
|
||||||
"x-systemd.automount"
|
"x-systemd.automount"
|
||||||
"x-systemd.device-timeout=1"
|
"x-systemd.device-timeout=1"
|
||||||
"x-systemd.idle-timeout=1min"
|
"x-systemd.idle-timeout=1min"
|
||||||
|
|||||||
@@ -110,6 +110,12 @@
|
|||||||
missing_format = "";
|
missing_format = "";
|
||||||
device = "ppp0";
|
device = "ppp0";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
format = " $icon FU";
|
||||||
|
missing_format = "";
|
||||||
|
device = "tun0";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
block = "net";
|
block = "net";
|
||||||
device = config.niveum.wirelessInterface;
|
device = config.niveum.wirelessInterface;
|
||||||
|
|||||||
2
secrets
2
secrets
Submodule secrets updated: d0b68f81a5...aaefa9ed14
Reference in New Issue
Block a user