-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zaatar): convert to flake feat(tahina, tabula): convert to flake feat(makanek): convert to flake feat(manakish, zaatar): convert to flake feat(ci): build flake systems fix: ci build feat: secrets via submodule foo foo foo
- Loading branch information
Showing
92 changed files
with
1,656 additions
and
934 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "secrets"] | ||
path = secrets | ||
url = ssh://[email protected]:22022/kfm/niveum-secrets.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,38 @@ | |
smtp.port = 25; | ||
smtp.tls.useStartTls = true; | ||
}; | ||
passwordCommandFrom = path: toString (pkgs.writers.writeDash "email-credentials" "echo ${lib.escapeShellArg (lib.strings.fileContents path)}"); | ||
in { | ||
age.secrets = { | ||
email-password-cock = { | ||
file = ../secrets/email-password-cock.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-fysi = { | ||
file = ../secrets/email-password-fysi.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-posteo = { | ||
file = ../secrets/email-password-posteo.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-meinhark = { | ||
file = ../secrets/email-password-meinhark.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-meinhaki = { | ||
file = ../secrets/email-password-meinhaki.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-dslalewa = { | ||
file = ../secrets/email-password-dslalewa.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
email-password-fsklassp = { | ||
file = ../secrets/email-password-fsklassp.age; | ||
owner = config.users.users.me.name; | ||
}; | ||
}; | ||
|
||
home-manager.users.me = { | ||
accounts.email.accounts = rec { | ||
hu-student = | ||
|
@@ -27,7 +57,7 @@ in { | |
userName = "meinhark"; | ||
address = "[email protected]"; | ||
aliases = ["${userName}@hu-berlin.de"]; | ||
passwordCommand = passwordCommandFrom <secrets/eduroam/password>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-meinhark.path}"; | ||
}); | ||
hu-student-cs = | ||
lib.recursiveUpdate defaults | ||
|
@@ -38,7 +68,7 @@ in { | |
aliases = ["${userName}@informatik.hu-berlin.de"]; | ||
imap.host = "mailbox.informatik.hu-berlin.de"; | ||
smtp.host = "mailhost.informatik.hu-berlin.de"; | ||
passwordCommand = passwordCommandFrom <secrets/eduroam/password>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-meinhark.path}"; | ||
}); | ||
hu-employee = | ||
lib.recursiveUpdate defaults | ||
|
@@ -47,7 +77,7 @@ in { | |
userName = "meinhaki"; | ||
address = "[email protected]"; | ||
aliases = ["${userName}@hu-berlin.de"]; | ||
passwordCommand = passwordCommandFrom <secrets/mail/meinhaki>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-meinhaki.path}"; | ||
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text); | ||
signature = { | ||
showSignature = "append"; | ||
|
@@ -69,7 +99,7 @@ in { | |
userName = "dslalewa"; | ||
address = "[email protected]"; | ||
aliases = ["${userName}@hu-berlin.de"]; | ||
passwordCommand = passwordCommandFrom <secrets/mail/dslalewa>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-dslalewa.path}"; | ||
inherit (hu-employee) signature; | ||
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text); | ||
}); | ||
|
@@ -78,7 +108,7 @@ in { | |
(lib.recursiveUpdate hu-defaults | ||
rec { | ||
userName = "fsklassp"; | ||
passwordCommand = passwordCommandFrom <secrets/mail/fsklassp>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-fsklassp.path}"; | ||
address = "${userName}@hu-berlin.de"; | ||
realName = "FSI Klassische Philologie"; | ||
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text); | ||
|
@@ -100,15 +130,15 @@ in { | |
rec { | ||
address = "[email protected]"; | ||
userName = address; | ||
passwordCommand = passwordCommandFrom <secrets/mail/fastmail>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-fysi.path}"; | ||
flavor = "fastmail.com"; | ||
}; | ||
cock = | ||
lib.recursiveUpdate defaults | ||
rec { | ||
address = "[email protected]"; | ||
userName = address; | ||
passwordCommand = passwordCommandFrom <secrets/mail/cock>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-cock.path}"; | ||
realName = ""; | ||
imap.host = "mail.cock.li"; | ||
smtp.host = imap.host; | ||
|
@@ -122,7 +152,7 @@ in { | |
imap.host = "posteo.de"; | ||
smtp.host = imap.host; | ||
primary = true; | ||
passwordCommand = passwordCommandFrom <secrets/mail/posteo>; | ||
passwordCommand = "cat ${config.age.secrets.email-password-posteo.path}"; | ||
# himalaya = { enable = true; backend = "imap"; sender = "smtp"; }; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,8 @@ | |
pkgs, | ||
... | ||
}: let | ||
inherit (import <niveum/lib>) tmpfilesConfig; | ||
inherit (import ../lib) tmpfilesConfig; | ||
in { | ||
imports = [ | ||
<niveum/modules/dropbox.nix> | ||
]; | ||
|
||
niveum = { | ||
dropbox.enable = false; | ||
}; | ||
|
||
systemd.tmpfiles.rules = map tmpfilesConfig [ | ||
{ | ||
type = "L+"; | ||
|
@@ -55,13 +47,13 @@ in { | |
script = let | ||
kieran = { | ||
user = "kieran"; | ||
password = lib.fileContents <secrets/nextcloud/password>; | ||
passwordFile = config.age.secrets.nextcloud-password-kieran.path; | ||
endpoint = "https://cloud.xn--kiern-0qa.de"; | ||
target = "${config.users.users.me.home}/notes"; | ||
}; | ||
in '' | ||
mkdir -p ${lib.escapeShellArg kieran.target} | ||
${pkgs.nextcloud-client}/bin/nextcloudcmd --non-interactive --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint} | ||
${pkgs.nextcloud-client}/bin/nextcloudcmd --non-interactive --user ${kieran.user} --password "$(cat ${kieran.passwordFile})" --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint} | ||
''; | ||
serviceConfig = { | ||
Type = "oneshot"; | ||
|
@@ -81,9 +73,9 @@ in { | |
(let | ||
kieran = { | ||
user = "[email protected]"; | ||
password = lib.fileContents <secrets/mega/password>; | ||
passwordFile = config.age.secrets.mega-password.path; | ||
}; | ||
megatools = command: "${pkgs.megatools}/bin/megatools ${command} --username ${lib.escapeShellArg kieran.user} --password ${lib.escapeShellArg kieran.password}"; | ||
megatools = command: ''${pkgs.megatools}/bin/megatools ${command} --username ${lib.escapeShellArg kieran.user} --password "$(cat ${kieran.passwordFile})"''; | ||
in | ||
pkgs.writers.writeDashBin "book-mega" '' | ||
set -efu | ||
|
@@ -104,6 +96,8 @@ in { | |
'') | ||
]; | ||
|
||
age.secrets.mega-password.file = ../secrets/mega-password.age; | ||
|
||
fileSystems."/media/moodle" = { | ||
device = "zaatar.r:/moodle"; | ||
fsType = "nfs"; | ||
|
@@ -120,9 +114,9 @@ in { | |
openDefaultPorts = true; | ||
configDir = "/home/kfm/.config/syncthing"; | ||
dataDir = "/home/kfm/.config/syncthing"; | ||
cert = toString <system-secrets/syncthing/cert.pem>; | ||
key = toString <system-secrets/syncthing/key.pem>; | ||
inherit ((import <niveum/lib>).syncthing) devices; | ||
cert = config.age.secrets.syncthing-cert.path; | ||
key = config.age.secrets.syncthing-key.path; | ||
inherit ((import ../lib).syncthing) devices; | ||
folders = let | ||
cloud-dir = "${config.users.users.me.home}/cloud"; | ||
in { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.