2020-05-16 11:20:32 +00:00
|
|
|
let
|
2020-05-27 13:20:08 +00:00
|
|
|
inherit (import (import ../nix/sources.nix).nixpkgs { }) lib;
|
2020-05-16 11:20:32 +00:00
|
|
|
makeConfig = hostName: imports:
|
|
|
|
{ ... }: {
|
|
|
|
imports = imports ++ [ ./default.nix ];
|
|
|
|
m-0.hostName = hostName;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
apollo = let
|
|
|
|
setStartpage = startpage:
|
|
|
|
{ ... }: {
|
|
|
|
programs.firefox.profiles."fz2sm95u.default".settings = {
|
|
|
|
"browser.startup.homepage" = startpage;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
makeBlock = list:
|
|
|
|
{ pkgs, lib, ... }: {
|
|
|
|
systemd.user = {
|
|
|
|
services.blockserver = {
|
|
|
|
Unit = { Description = "Serve a blocklist"; };
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${pkgs.python3}/bin/python -m http.server 8842 -d ${
|
|
|
|
pkgs.writeTextDir "blocklist"
|
|
|
|
(lib.concatStringsSep "\r\n" list)
|
|
|
|
}";
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
Install = { WantedBy = [ "default.target" ]; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
tinkerPages = [
|
|
|
|
"reddit.com"
|
|
|
|
"github.com"
|
|
|
|
"*.ccc.de"
|
|
|
|
"haskell.org"
|
|
|
|
"*.haskell.org"
|
|
|
|
"*.nixos.org"
|
|
|
|
"nixos.org"
|
|
|
|
"matrix.org"
|
|
|
|
"riot.im"
|
|
|
|
"youtube.de"
|
|
|
|
"youtube.com"
|
|
|
|
];
|
|
|
|
leisurePages = [
|
|
|
|
"zeit.de"
|
|
|
|
"heise.de"
|
|
|
|
"spiegel.de"
|
|
|
|
"xkcd.com"
|
|
|
|
"smbc-comics.com"
|
|
|
|
"tagesschau.de"
|
|
|
|
"welt.de"
|
|
|
|
"ndr.de"
|
|
|
|
"ard.de"
|
|
|
|
"zdf.de"
|
|
|
|
"twitter.com"
|
|
|
|
"chaos.social"
|
|
|
|
];
|
|
|
|
apolloConfig = imports:
|
|
|
|
makeConfig "apollo" (imports ++ [
|
2020-07-01 23:20:18 +00:00
|
|
|
./roles/zettelkasten.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
./battery.nix
|
2020-07-03 13:07:03 +00:00
|
|
|
./roles/mpd.nix
|
|
|
|
./roles/beets.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
./mpclient.nix
|
|
|
|
./on-my-machine.nix
|
|
|
|
./desktop
|
|
|
|
./git-sign.nix
|
|
|
|
./laptop.nix
|
2020-05-19 21:24:09 +00:00
|
|
|
./mail.nix
|
|
|
|
./update_tasks.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
]);
|
2020-06-21 16:58:35 +00:00
|
|
|
unrestricted = [
|
|
|
|
./orga.nix
|
|
|
|
./accounting.nix
|
2020-05-19 21:24:09 +00:00
|
|
|
./mail-client.nix
|
2020-06-21 16:58:35 +00:00
|
|
|
./pythia.nix
|
|
|
|
./research.nix
|
|
|
|
./tinkering.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
./chat.nix
|
2020-06-21 16:58:35 +00:00
|
|
|
(setStartpage "https://stats.maralorn.de/d/health-status")
|
2020-05-16 11:20:32 +00:00
|
|
|
(makeBlock [ ])
|
|
|
|
];
|
2020-06-21 16:58:35 +00:00
|
|
|
in {
|
|
|
|
unrestricted = apolloConfig unrestricted;
|
2020-05-16 11:20:32 +00:00
|
|
|
orga = apolloConfig [
|
2020-06-09 08:13:32 +00:00
|
|
|
./orga.nix
|
2020-05-19 21:24:09 +00:00
|
|
|
./mail-client.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
./accounting.nix
|
|
|
|
./pythia.nix
|
2020-06-09 21:51:46 +00:00
|
|
|
(setStartpage "https://habitica.com")
|
2020-05-16 11:20:32 +00:00
|
|
|
(makeBlock (tinkerPages ++ leisurePages))
|
|
|
|
];
|
|
|
|
research = apolloConfig [
|
|
|
|
./research.nix
|
|
|
|
(makeBlock (tinkerPages ++ leisurePages))
|
|
|
|
(setStartpage "http://localhost:8042")
|
|
|
|
];
|
2020-06-21 16:58:35 +00:00
|
|
|
gaming = apolloConfig (unrestricted ++ [./games.nix]);
|
2020-05-16 11:20:32 +00:00
|
|
|
};
|
|
|
|
hera = {
|
|
|
|
default = makeConfig "hera" [
|
|
|
|
./on-my-machine.nix
|
2020-05-22 13:45:07 +00:00
|
|
|
./headless.nix
|
2020-07-02 19:54:17 +00:00
|
|
|
#..nixos/machineshera/weechat
|
|
|
|
./roles/weechat
|
2020-05-16 11:45:25 +00:00
|
|
|
./kassandra-server.nix
|
2020-05-16 11:20:32 +00:00
|
|
|
./headless-mpd.nix
|
|
|
|
./mail.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|