❄️ Dotfiles for our NixOS system configuration.
1{ lib, config, ... }:
2
3{
4 config = lib.mkIf config.settings.profiles.headless.enable {
5 # We print the URLs instead for servers.
6 environment.variables.BROWSER = "echo";
7
8 # We don't need fonts on a server.
9 fonts = lib.mapAttrs (_: lib.mkForce) {
10 packages = [ ];
11 fontDir.enable = false;
12 fontconfig.enable = false;
13 };
14
15 xdg = lib.mapAttrs (_: lib.mkForce) {
16 autostart.enable = false;
17 icons.enable = false;
18 mime.enable = false;
19 menus.enable = false;
20 sounds.enable = false;
21 };
22
23 # Disable suspend and hibernation on headless systems
24 systemd.sleep.extraConfig = ''
25 AllowSuspend=no
26 AllowHibernation=no
27 '';
28 };
29}