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

111 lines
2.7 KiB
Nix
Raw Normal View History

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"
"youtube.de"
"youtube.com"
"*.element.io"
"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"
];
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
./roles/mail.nix
./roles/kassandra.nix
./roles/taskwarrior.nix
./roles/vdirsyncer.nix
./roles/khard.nix
./roles/khal.nix
./roles/mode-switching.nix
];
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-03-10 09:31:37 +00:00
(makeAutostart "kassandra2")
2021-07-30 21:09:20 +00:00
(makeAutostart "unlock-ssh")
2021-07-09 11:48:25 +00:00
./roles/accounting.nix
./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
./roles/systemd-exporter.nix
2021-07-09 11:48:25 +00:00
./roles/tinkering.nix
./roles/update_tasks.nix
];
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-07-30 21:09:20 +00:00
research = makeConfig name (all ++ [ (blockServer restrictedPages) ]);
orga = makeConfig name (all ++ orgaExtra ++ [ (blockServer restrictedPages) ]);
leisure = makeConfig name (
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
];
zeus = daily-driver "zeus" [
./roles/hourly-maintenance.nix
./roles/state.nix
];
2020-05-16 11:20:32 +00:00
hera = {
2021-08-03 18:50:05 +00:00
default = makeConfig "hera" (on-my-machines ++ [
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
};
}