2020-05-16 11:20:32 +00:00
|
|
|
let
|
2021-05-18 14:33:28 +00:00
|
|
|
inherit (import (import ../nix/sources.nix).nixos-unstable { }) lib;
|
2021-07-09 11:48:25 +00:00
|
|
|
restrictedPages = [
|
|
|
|
"reddit.com"
|
|
|
|
"github.com"
|
|
|
|
"*.ccc.de"
|
|
|
|
"haskell.org"
|
|
|
|
"*.haskell.org"
|
|
|
|
"*.nixos.org"
|
|
|
|
"nixos.org"
|
|
|
|
"matrix.org"
|
|
|
|
"element.io"
|
2021-10-16 21:14:30 +00:00
|
|
|
"youtube.*"
|
2021-07-09 11:48:25 +00:00
|
|
|
"*.element.io"
|
2021-10-16 21:14:30 +00:00
|
|
|
"chaos.social"
|
|
|
|
] ++ newsPages;
|
|
|
|
newsPages = [
|
2021-07-09 11:48:25 +00:00
|
|
|
"zeit.de"
|
|
|
|
"heise.de"
|
|
|
|
"spiegel.de"
|
2021-10-16 21:14:30 +00:00
|
|
|
"taz.de"
|
|
|
|
"faz.net"
|
|
|
|
"bild.de"
|
2021-07-09 11:48:25 +00:00
|
|
|
"xkcd.com"
|
|
|
|
"smbc-comics.com"
|
|
|
|
"tagesschau.de"
|
|
|
|
"welt.de"
|
|
|
|
"ndr.de"
|
|
|
|
"ard.de"
|
|
|
|
"zdf.de"
|
|
|
|
"twitter.com"
|
|
|
|
];
|
2021-10-16 21:14:30 +00:00
|
|
|
|
2020-05-16 11:20:32 +00:00
|
|
|
makeConfig = hostName: imports:
|
2021-03-10 09:31:37 +00:00
|
|
|
{ ... }: {
|
2021-05-18 14:33:28 +00:00
|
|
|
imports = imports ++ [ ./roles/default.nix ];
|
|
|
|
m-0.hostName = hostName;
|
|
|
|
nixpkgs.overlays = [ (_: _: (import ../channels.nix).${hostName}) ];
|
2021-03-10 09:31:37 +00:00
|
|
|
};
|
2021-07-05 00:44:32 +00:00
|
|
|
makeAutostart = name:
|
|
|
|
{ config, ... }: {
|
2021-07-05 19:18:23 +00:00
|
|
|
config.xdg.configFile."autostart/${name}.desktop".source =
|
2021-07-05 00:44:32 +00:00
|
|
|
"${config.home.path}/share/applications/${name}.desktop";
|
|
|
|
};
|
2021-07-30 21:09:20 +00:00
|
|
|
on-my-machines = [
|
|
|
|
./roles/on-my-machine.nix
|
2021-08-16 19:04:08 +00:00
|
|
|
./roles/accounting.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/mail.nix
|
|
|
|
./roles/kassandra.nix
|
|
|
|
./roles/taskwarrior.nix
|
|
|
|
./roles/vdirsyncer.nix
|
|
|
|
./roles/khard.nix
|
|
|
|
./roles/khal.nix
|
|
|
|
./roles/mode-switching.nix
|
2021-08-03 21:23:15 +00:00
|
|
|
./roles/systemd-exporter.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
];
|
|
|
|
daily-driver = name: extra:
|
2021-05-18 14:33:28 +00:00
|
|
|
let
|
2021-07-30 21:09:20 +00:00
|
|
|
all = extra ++ on-my-machines ++ [
|
|
|
|
(import ./roles/firefox.nix "http://localhost:8842")
|
2021-11-26 19:07:33 +00:00
|
|
|
(makeAutostart "kassandra2")
|
2021-07-30 21:09:20 +00:00
|
|
|
(makeAutostart "unlock-ssh")
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/beets.nix
|
|
|
|
./roles/daily-driver-programs.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/desktop-items.nix
|
|
|
|
./roles/desktop.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/git-sign.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/gnome.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/hoogle.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/kitty.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/mpclient.nix
|
|
|
|
./roles/mpd.nix
|
|
|
|
./roles/pythia.nix
|
|
|
|
./roles/research.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/sleep-nag.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/tinkering.nix
|
2021-08-03 21:46:29 +00:00
|
|
|
./roles/wallpaper.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
];
|
2021-07-30 21:09:20 +00:00
|
|
|
orgaExtra = [
|
|
|
|
./roles/accounting.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
./roles/mail-client.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/pythia.nix
|
|
|
|
./roles/tinkering.nix
|
2021-07-09 11:48:25 +00:00
|
|
|
];
|
2021-07-30 21:09:20 +00:00
|
|
|
blockServer = import ./roles/block-server.nix;
|
2021-07-09 11:48:25 +00:00
|
|
|
in
|
|
|
|
{
|
2021-10-16 21:14:30 +00:00
|
|
|
klausur = makeConfig name (
|
|
|
|
all ++ [
|
|
|
|
(blockServer restrictedPages)
|
|
|
|
]
|
|
|
|
);
|
|
|
|
orga = makeConfig name (
|
|
|
|
all ++ orgaExtra ++ [
|
|
|
|
(blockServer restrictedPages)
|
|
|
|
]
|
|
|
|
);
|
2021-10-16 21:15:39 +00:00
|
|
|
communication = makeConfig name (
|
2021-10-16 21:14:30 +00:00
|
|
|
all ++ orgaExtra ++ [
|
|
|
|
./roles/chat.nix
|
|
|
|
(blockServer restrictedPages)
|
|
|
|
]
|
|
|
|
);
|
2021-11-18 14:38:40 +00:00
|
|
|
code = makeConfig name (
|
|
|
|
all ++ orgaExtra ++ [
|
|
|
|
./roles/chat.nix
|
|
|
|
(blockServer newsPages)
|
|
|
|
]
|
|
|
|
);
|
2021-07-30 21:09:20 +00:00
|
|
|
leisure = makeConfig name (
|
2021-10-16 21:14:30 +00:00
|
|
|
all ++ orgaExtra ++ [
|
|
|
|
./roles/games.nix
|
|
|
|
./roles/chat.nix
|
|
|
|
(blockServer newsPages)
|
|
|
|
]
|
|
|
|
);
|
|
|
|
unrestricted = makeConfig name (
|
2021-07-30 21:09:20 +00:00
|
|
|
all ++ orgaExtra ++ [
|
|
|
|
./roles/games.nix
|
|
|
|
./roles/chat.nix
|
|
|
|
(blockServer [ ])
|
|
|
|
]
|
|
|
|
);
|
2021-07-09 11:48:25 +00:00
|
|
|
};
|
2021-07-30 21:09:20 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
apollo = daily-driver "apollo" [
|
|
|
|
./roles/battery.nix
|
2021-10-08 10:32:57 +00:00
|
|
|
./roles/untrusted-env.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
];
|
|
|
|
zeus = daily-driver "zeus" [
|
|
|
|
./roles/hourly-maintenance.nix
|
2021-12-06 12:05:26 +00:00
|
|
|
(import ./roles/state.nix "orga")
|
2021-10-08 10:32:57 +00:00
|
|
|
./roles/trusted-env.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
];
|
2021-12-05 04:11:17 +00:00
|
|
|
fluffy = {
|
2021-12-05 05:30:51 +00:00
|
|
|
default = makeConfig "fluffy" ([
|
2021-12-05 04:30:36 +00:00
|
|
|
./roles/on-my-machine.nix
|
|
|
|
./roles/mode-switching.nix
|
|
|
|
./roles/systemd-exporter.nix
|
|
|
|
./roles/headless.nix
|
2021-12-06 12:05:26 +00:00
|
|
|
(import ./roles/state.nix "default")
|
2021-12-05 04:11:17 +00:00
|
|
|
]);
|
|
|
|
};
|
2020-05-16 11:20:32 +00:00
|
|
|
hera = {
|
2021-08-03 18:50:05 +00:00
|
|
|
default = makeConfig "hera" (on-my-machines ++ [
|
2021-08-16 19:04:08 +00:00
|
|
|
./roles/fetch-banking-timer.nix
|
2020-07-02 19:54:17 +00:00
|
|
|
./roles/weechat
|
2020-12-12 22:39:54 +00:00
|
|
|
./roles/mail2rss.nix
|
2021-07-30 21:09:20 +00:00
|
|
|
./roles/headless-mpd.nix
|
|
|
|
./roles/headless.nix
|
2021-08-03 18:50:05 +00:00
|
|
|
]);
|
2020-05-16 11:20:32 +00:00
|
|
|
};
|
|
|
|
}
|