blob: d16955431cbe742a4e25ef4ded66a3ffc5d0d699 (
plain) (
blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# This module is common in the weakest sense, i.e. contains common settings to
# all my machines contained in depot—as opposed to common to all my potential
# machines. Consequently, this module is currently very server-centric.
{ pkgs, lib, depot, config, ... }:
let
me = "lukas";
in
{
config = {
# More common
time.timeZone = "Europe/Berlin";
nix = {
settings = {
trusted-public-keys = lib.mkAfter [
"headcounter.org:/7YANMvnQnyvcVB6rgFTdb8p5LG1OTXaO+21CaOSBzg="
];
substituters = lib.mkAfter [
"https://hydra.build"
];
trusted-users = [ me ];
allowed-users = [ ];
log-lines = 0;
};
};
tvl.cache.enable = true;
programs.fish.enable = true;
users = {
users = {
root.openssh.authorizedKeys.keys = depot.users.sterni.keys.all;
${me} = {
isNormalUser = true;
extraGroups = [ "wheel" "http" "git" ];
openssh.authorizedKeys.keys = depot.users.sterni.keys.all;
shell = pkgs.fish;
};
};
};
# Less common
services = {
journald.extraConfig = ''
SystemMaxUse=10G
'';
openssh.enable = true;
# TODO(sterni): consider porting to reaction
fail2ban.enable = true;
};
programs = {
mosh.enable = true;
tmux.enable = true;
};
environment.systemPackages = [
pkgs.wget
pkgs.git
pkgs.htop
pkgs.foot.terminfo
pkgs.vim
pkgs.smartmontools
depot.third_party.asncounter
];
documentation = {
# pulls in pkgs.nix
nixos.enable = false;
# unnecessary on a server
doc.enable = false;
man = {
enable = true;
man-db.enable = false;
mandoc.enable = true;
};
};
security.acme = {
defaults.email = builtins.getAttr "email" (
builtins.head (
builtins.filter ({ username, ... }: username == "sterni") depot.ops.users
)
);
acceptTerms = true;
};
};
}
|