blob: f9095a7389901c31cc75abfc3c907a305f333cac (
plain)
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
|
{ pkgs, ... }:
let
util = import ./util.nix;
me = import ./me.nix { inherit util; };
security = import ./security.nix;
in
{
system.stateVersion = "23.05";
imports = [
./modules
(./hardware + "/${me.name}.nix")
(./machines + "/${me.name}.nix")
];
nixpkgs = {
config.allowUnfree = true;
overlays = [ (super: final: import ./pkgs final )];
};
boot.loader.systemd-boot.enable = true;
users.mutableUsers = false;
users.users.mel = {
isNormalUser = true;
home = "/home/mel";
shell = pkgs.fish;
extraGroups = [ "wheel" "docker" ];
openssh.authorizedKeys.keys = security.keys;
hashedPassword = security.password;
};
networking = {
hostName = me.name;
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
trustedInterfaces = [ "tailscale0" ];
};
};
services = {
openssh = {
enable = true;
openFirewall = false;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
tailscale = {
enable = true;
useRoutingFeatures = "client";
};
nginx.enable = true;
};
virtualisation = {
docker = {
enable = true;
enableOnBoot = true;
};
};
programs = {
fish.enable = true;
git.enable = true;
tmux.enable = true;
};
services.nginx.virtualHosts = {
default = { default = true; };
"${me.name}.rnrd.eu" = { root = "/var/www/html"; };
};
environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [
vim
file
dig
inetutils
htop
];
}
|