1
0
Fork 0
nixos-config/home-manager/machines.nix

155 lines
3.6 KiB
Nix
Raw Normal View History

2020-05-16 11:20:32 +00:00
let
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"
2022-01-24 21:15:38 +00:00
"twitter.com"
2021-10-16 21:14:30 +00:00
] ++ 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"
];
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 ++ [
2022-02-16 23:43:20 +00:00
(import ./roles/firefox.nix "http://localhost:7000")
2022-02-20 15:58:23 +00:00
(makeAutostart "planning")
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
2022-01-20 01:49:52 +00:00
./roles/night-shutdown.nix
2021-07-09 11:48:25 +00:00
./roles/tinkering.nix
2021-08-03 21:46:29 +00:00
./roles/wallpaper.nix
2022-02-16 23:43:20 +00:00
./roles/zettelkasten.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
2022-01-28 14:07:45 +00:00
./roles/leisure.nix
2021-10-16 21:14:30 +00:00
(blockServer newsPages)
]
);
unrestricted = makeConfig name (
2021-07-30 21:09:20 +00:00
all ++ orgaExtra ++ [
./roles/games.nix
./roles/chat.nix
2022-01-28 14:07:45 +00:00
./roles/leisure.nix
2021-07-30 21:09:20 +00:00
(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
2022-01-30 13:06:09 +00:00
./roles/monitor-config
2021-07-30 21:09:20 +00:00
];
2021-12-21 23:01:55 +00:00
fluffy.default = makeConfig "fluffy" [
./roles/on-my-machine.nix
./roles/mode-switching.nix
./roles/systemd-exporter.nix
./roles/headless.nix
(import ./roles/state.nix "default")
];
hera.default = makeConfig "hera" (on-my-machines ++ [
./roles/fetch-banking-timer.nix
./roles/weechat
2021-12-22 00:05:13 +00:00
./roles/mail-sort.nix
2021-12-21 23:01:55 +00:00
./roles/mail2rss.nix
./roles/headless-mpd.nix
./roles/headless.nix
]);
2020-05-16 11:20:32 +00:00
}