This repository has been archived by the owner on Apr 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
configuration.nix
171 lines (152 loc) · 4.34 KB
/
configuration.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{ config, pkgs, lib, ... }:
let
domain-name = "knedlsepp.at";
in {
imports = [ ];
ec2.hvm = true;
nix = {
package = pkgs.nix_2_4;
autoOptimiseStore = true;
extraOptions = ''
auto-optimise-store = true
min-free = ${toString (3 * 1024 * 1024 * 1024)}
max-free = ${toString (6 * 1024 * 1024 * 1024)}
experimental-features = nix-command flakes
'';
buildMachines = [
{
hostName = "localhost";
systems = [ "i686-linux" "x86_64-linux" ];
maxJobs = 6;
supportedFeatures = [ "kvm" "nixos-test" ];
}
];
gc = {
automatic = true;
dates = "14:09";
};
useSandbox = true;
};
nixpkgs.overlays = [
(final: prev: {
nginxStable = prev.nginxStable.override { openssl = pkgs.openssl_1_1; };
})
];
time.timeZone = "Europe/Vienna";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
};
environment.systemPackages = with pkgs; [
vim
gitMinimal
lsof
htop
duc
fzf
];
programs.vim.defaultEditor = true;
programs.bash = {
enableCompletion = true;
shellAliases = {
l = "ls -rltah";
};
loginShellInit = ''
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
fi
'';
};
security.acme.defaults.email = "josef.kemetmueller@gmail.com";
security.acme.acceptTerms = true;
services.openssh.forwardX11 = true;
services.journald.extraConfig = ''
SystemMaxUse=300M
'';
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."josefundlena.at" = {
serverAliases = [ "www.josefundlena.at" ];
enableACME = true;
forceSSL = true;
root = lib.mkDefault (builtins.fetchGit {
url = "git@github.com:knedlsepp/save-the-date.git";
ref = "main";
rev = "2115be59a1770bf585ad331361167c4ed0cbe67e";
});
};
virtualHosts."${domain-name}" = {
serverAliases = [ "www.${domain-name}" ];
enableACME = true;
forceSSL = true;
root = builtins.fetchGit {
url = "https://github.com/knedlsepp/knedlsepp.at-landing-page.git";
rev = "0b53e064fd69b02222333e9ba666b0c034d3f362";
};
};
virtualHosts."lalensch.at" = {
enableACME = true;
forceSSL = true;
root = let
site = pkgs.writeTextFile {
name = "index.html";
destination = "/share/www/index.html";
text = ''
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>LaLensch</title>
<style>
h1 {
display: block;
font-size: 8em;
font-weight: bold;
}
</style>
</head>
<body>
<body><br><br><h1><center><div>LaLensch.at coming soon 🛠️</div></center></h1></body>
</html>
'';
}; in
"${site}/share/www/";
};
};
virtualisation.docker.enable = false;
system.autoUpgrade = {
enable = true;
flake = "github:knedlsepp/knedlsepp.at";
dates = "hourly";
};
networking.hostName = "knedlsepp-aws";
networking.firewall.allowedTCPPorts = [ 80 443
5900 5901 # VNC
];
swapDevices = [
{
device = "/var/swapfile";
size = 2048;
}
];
users.users."sepp".openssh.authorizedKeys.keys = [
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAILzIWsoe/+qZ/bjEBf64bq0MOkikSnTq/95+b2pbgu4jAAAABHNzaDo= ssh:"
];
users.users."root".openssh.authorizedKeys.keys = [
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINqxgyVV3kg7DpyGTsEiy2n+Va1vKWherFw8OpmAjVXYAAAABHNzaDo= sepp@localhohohost"
];
users.extraUsers.sepp = {
isNormalUser = true;
description = "Josef Knedlmüller";
initialPassword = "foo";
extraGroups = [ "docker" ];
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "17.09"; # Did you read the comment?
}