Initial PubSolarOS commit

This commit is contained in:
Benjamin Bädorf 2021-05-30 21:10:28 +02:00
parent 57291aa029
commit ddcf369f41
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
114 changed files with 5960 additions and 128 deletions

29
modules/email/default.nix Normal file
View file

@ -0,0 +1,29 @@
{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.email;
in
{
options.pub-solar.email = {
enable = mkEnableOption "Life in headers";
};
config = mkIf cfg.enable {
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [
w3m
urlscan
neomutt
offlineimap
msmtp
mailto-mutt
];
programs.offlineimap = {
enable = true;
pythonFile = builtins.readFile ./offlineimap.py;
};
};
};
}

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,9 @@
#! /usr/bin/env python2
import os
import subprocess
def get_env(key):
return os.getenv(key)
def get_secret(*attributes):
return subprocess.check_output(["secret-tool", "lookup"] + list(attributes))