-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.nix
48 lines (38 loc) · 1.25 KB
/
server.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ config, lib, pkgs, ... }:
{
imports = [ ./nixos.nix ];
# Disable UI stuff
environment.noXlibs = true;
services.udisks2.enable = lib.mkDefault false;
xdg.autostart.enable = false;
xdg.mime.enable = false;
xdg.sounds.enable = false;
xdg.icons.enable = false;
services.fwupd.enable = false;
# Disable extra shells, servers should normally use bash.
# fish adds a big extra build step of generating completions from man pages,
# which is only worth it on desktops.
programs.fish.enable = false;
programs.zsh.enable = false;
# Servers don't usually need to print.
services.printing.enable = false;
hardware.sane.enable = false;
# Turn off X
services.xserver.enable = false;
# Allow SSH connections in.
services.openssh.enable = true;
networking.firewall.enable = true;
# Ignore lid events, in case this is a laptop server.
services.logind.lidSwitch = "ignore";
# Turn OFF any bluetooth hardware for servers.
hardware.bluetooth.enable = false;
# Turn off audio hardware for servers.
sound.enable = false;
services.pipewire.enable = false;
# Allow the server to be resolved by hostname on the local network ('steve.local')
services.avahi.publish = {
enable = true;
addresses = true;
domain = true;
};
}