2023-06-21 14:21:40 +02:00
|
|
|
args@{ pkgs, config, ... }:
|
2022-07-30 18:19:49 +02:00
|
|
|
|
2022-07-30 22:55:19 +02:00
|
|
|
let
|
2023-06-21 14:21:40 +02:00
|
|
|
secret = import ../../secret/hosts/tanker.nix;
|
2022-07-31 20:33:19 +02:00
|
|
|
ssh-keys = import ../shared/ssh-keys.nix;
|
2022-07-30 22:55:19 +02:00
|
|
|
in
|
2022-07-30 18:19:49 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2023-06-21 14:21:40 +02:00
|
|
|
../../hardware/hosts/tanker.nix
|
|
|
|
../nixos/zfs.nix
|
|
|
|
../../agenix/hosts/tanker/config.nix
|
2023-05-14 21:24:51 +02:00
|
|
|
../shared/show-update-changelog.nix
|
2022-07-30 19:49:04 +02:00
|
|
|
../nixos/ssh.nix
|
2024-01-21 22:55:44 +01:00
|
|
|
../nixos/eternal-terminal.nix
|
2023-06-23 20:08:22 +02:00
|
|
|
../nixos/msmtp.nix
|
2023-06-24 20:19:50 +02:00
|
|
|
../nixos/smartd.nix
|
2022-07-30 19:49:04 +02:00
|
|
|
|
|
|
|
../nixos/git.nix
|
2022-11-29 15:17:23 +01:00
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
../nixos/acme-tanker.nix
|
2023-03-05 23:51:30 +01:00
|
|
|
../nixos/nginx.nix
|
2023-09-04 12:45:06 +02:00
|
|
|
../nixos/nginx-tanker.nix
|
2023-06-21 14:21:40 +02:00
|
|
|
../nixos/postgresql.nix
|
|
|
|
../nixos/elasticsearch.nix
|
|
|
|
../nixos/mosquitto.nix
|
|
|
|
../nixos/container.nix
|
|
|
|
|
|
|
|
../nixos/anonymous-overflow.nix
|
2023-03-05 23:02:49 +01:00
|
|
|
|
2023-02-27 17:53:15 +01:00
|
|
|
../nixos/atuin-sync.nix
|
2023-02-27 17:51:39 +01:00
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
(import ../nixos/atticd.nix (args // { inherit secret; }))
|
2023-04-05 13:12:40 +02:00
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
../nixos/fedifetcher.nix
|
2023-02-15 20:35:46 +01:00
|
|
|
|
2023-09-12 00:05:25 +02:00
|
|
|
../nixos/forgejo.nix
|
2024-02-15 18:21:21 +01:00
|
|
|
(import ../nixos/forgejo-runner.nix (args // { inherit secret; name = "tanker"; tag = "ubuntu-latest-amd64"; nixTag = "amd64"; }))
|
2023-09-12 00:05:25 +02:00
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
(import ../nixos/home-proxy.nix (args // { inherit secret; }))
|
2023-01-24 14:33:54 +01:00
|
|
|
|
2023-03-20 13:49:46 +01:00
|
|
|
../nixos/invidious.nix
|
|
|
|
|
2023-12-28 13:55:57 +01:00
|
|
|
(import ../nixos/redlib.nix (args // { inherit secret; }))
|
2023-02-12 22:13:30 +01:00
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
../nixos/mastodon.nix
|
|
|
|
|
|
|
|
../nixos/miniflux.nix
|
2022-11-29 15:17:23 +01:00
|
|
|
|
2023-02-18 20:54:15 +01:00
|
|
|
(import ../nixos/ntfy-sh.nix (args // { inherit secret; }))
|
|
|
|
|
2023-08-01 18:32:28 +02:00
|
|
|
../nixos/matrix
|
2022-11-29 15:17:23 +01:00
|
|
|
|
2023-04-04 15:05:39 +02:00
|
|
|
../nixos/tailscale.nix
|
2024-05-25 15:47:17 +02:00
|
|
|
../nixos/tailscale-nodns.nix
|
2022-07-30 20:17:39 +02:00
|
|
|
|
2023-07-11 11:08:34 +02:00
|
|
|
../nixos/websites-tanker.nix
|
2023-07-01 16:17:40 +02:00
|
|
|
|
2024-06-30 23:29:43 +02:00
|
|
|
../nixos/weewx.nix
|
2022-07-30 18:19:49 +02:00
|
|
|
];
|
|
|
|
|
2022-12-25 22:13:07 +01:00
|
|
|
system.stateVersion = "22.11";
|
|
|
|
|
2022-07-30 18:19:49 +02:00
|
|
|
nix = {
|
2022-08-05 11:37:45 +02:00
|
|
|
settings = {
|
2024-07-05 22:33:27 +02:00
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
extra-platforms = [ "aarch64-linux" ];
|
2022-07-30 18:19:49 +02:00
|
|
|
|
2024-07-05 22:33:27 +02:00
|
|
|
log-lines = 25;
|
|
|
|
auto-optimise-store = true;
|
|
|
|
keep-derivations = true;
|
|
|
|
keep-outputs = true;
|
|
|
|
|
|
|
|
extra-substituters = [
|
|
|
|
"https://attic.cache.daniel.sx/nifoc-systems?priority=30"
|
|
|
|
"https://attic.cache.daniel.sx/nifoc-ci?priority=35"
|
|
|
|
"https://nix-community.cachix.org?priority=50"
|
|
|
|
"https://cache.garnix.io?priority=60"
|
2024-07-14 23:05:41 +02:00
|
|
|
"https://cache.lix.systems?priority=70"
|
2022-08-05 11:37:45 +02:00
|
|
|
];
|
|
|
|
|
2024-07-05 22:33:27 +02:00
|
|
|
extra-trusted-public-keys = [
|
2023-04-12 20:03:02 +02:00
|
|
|
"nifoc-systems:eDDqVP5BFR6/1KvXbF9oUL8JahDdmbrsYtxlQ57LOTU="
|
2023-09-14 19:39:10 +02:00
|
|
|
"nifoc-ci:JpD9zqVQi8JuS7B8htPDOQZh08rhInMnGFS9RVhiuwk="
|
2022-08-05 11:37:45 +02:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2024-07-03 00:01:29 +02:00
|
|
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
2024-07-14 23:05:41 +02:00
|
|
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
2022-08-05 11:37:45 +02:00
|
|
|
];
|
2024-07-05 22:33:27 +02:00
|
|
|
|
|
|
|
connect-timeout = 5;
|
2022-08-05 11:37:45 +02:00
|
|
|
};
|
2022-07-30 18:19:49 +02:00
|
|
|
|
2022-08-18 23:12:16 +02:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 14d";
|
|
|
|
};
|
2022-07-30 18:19:49 +02:00
|
|
|
};
|
|
|
|
|
2022-08-07 17:54:05 +02:00
|
|
|
boot = {
|
2023-04-17 17:11:07 +02:00
|
|
|
tmp.cleanOnBoot = true;
|
2022-08-07 17:54:05 +02:00
|
|
|
|
|
|
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
};
|
2022-07-30 18:19:49 +02:00
|
|
|
|
2023-03-28 21:50:32 +02:00
|
|
|
networking = {
|
2023-06-21 14:21:40 +02:00
|
|
|
hostName = "tanker";
|
|
|
|
hostId = "d89f488a";
|
2023-03-28 21:50:32 +02:00
|
|
|
useNetworkd = true;
|
|
|
|
};
|
|
|
|
|
2023-07-16 16:28:53 +02:00
|
|
|
systemd = {
|
|
|
|
enableEmergencyMode = false;
|
|
|
|
|
|
|
|
watchdog = {
|
|
|
|
runtimeTime = "20s";
|
|
|
|
rebootTime = "30s";
|
|
|
|
};
|
|
|
|
|
|
|
|
network = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
"10-wan" = {
|
|
|
|
matchConfig.Name = "enp41s0";
|
|
|
|
address = [
|
|
|
|
"94.130.142.168/26"
|
|
|
|
"2a01:4f8:13b:2d81::2/64"
|
|
|
|
];
|
|
|
|
gateway = [
|
|
|
|
"94.130.142.129"
|
|
|
|
"fe80::1"
|
|
|
|
];
|
|
|
|
linkConfig.RequiredForOnline = "routable";
|
|
|
|
|
|
|
|
dns = [
|
|
|
|
"185.12.64.1"
|
|
|
|
"185.12.64.2"
|
|
|
|
"2a01:4ff:ff00::add:1"
|
|
|
|
"2a01:4ff:ff00::add:2"
|
|
|
|
];
|
|
|
|
|
|
|
|
ntp = [
|
|
|
|
"ntp1.hetzner.de"
|
|
|
|
"ntp2.hetzner.com"
|
|
|
|
"ntp3.hetzner.net"
|
|
|
|
];
|
|
|
|
};
|
2023-02-03 23:52:44 +01:00
|
|
|
};
|
2023-07-16 16:28:53 +02:00
|
|
|
|
|
|
|
wait-online.extraArgs = [
|
|
|
|
"--interface=enp41s0"
|
|
|
|
];
|
2023-03-28 17:42:22 +02:00
|
|
|
};
|
2023-05-09 09:15:01 +02:00
|
|
|
|
2023-07-16 16:28:53 +02:00
|
|
|
sleep.extraConfig = ''
|
|
|
|
AllowSuspend=no
|
|
|
|
AllowHibernation=no
|
|
|
|
'';
|
2023-03-28 17:42:22 +02:00
|
|
|
};
|
2022-07-31 15:21:51 +02:00
|
|
|
|
2022-12-01 22:48:43 +01:00
|
|
|
services.journald.extraConfig = ''
|
2023-06-21 14:21:40 +02:00
|
|
|
SystemMaxUse=4G
|
2023-10-11 14:41:14 +02:00
|
|
|
MaxRetentionSec=30day
|
2022-12-01 22:48:43 +01:00
|
|
|
'';
|
|
|
|
|
2023-11-12 22:40:40 +01:00
|
|
|
security.sudo.enable = true;
|
|
|
|
|
2023-06-21 14:21:40 +02:00
|
|
|
services.zfs.autoScrub.enable = true;
|
|
|
|
|
2023-02-23 21:41:41 +01:00
|
|
|
documentation = {
|
|
|
|
nixos.enable = false;
|
|
|
|
doc.enable = false;
|
|
|
|
};
|
2022-10-24 13:19:23 +02:00
|
|
|
|
2023-07-16 16:28:53 +02:00
|
|
|
fonts.fontconfig.enable = false;
|
|
|
|
|
2024-12-24 01:41:50 +01:00
|
|
|
programs = {
|
|
|
|
htop.enable = true;
|
|
|
|
zsh.enable = true;
|
|
|
|
};
|
2022-08-01 12:24:30 +02:00
|
|
|
|
2022-07-31 20:33:19 +02:00
|
|
|
users.users = {
|
|
|
|
root = {
|
2023-06-21 14:21:40 +02:00
|
|
|
openssh.authorizedKeys.keys = [ ssh-keys.Hetzner ssh-keys.BackupTanker ];
|
2022-07-31 20:33:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
daniel = {
|
2023-09-16 13:08:38 +02:00
|
|
|
hashedPasswordFile = config.age.secrets.user-daniel-password.path;
|
2022-07-31 20:33:19 +02:00
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/daniel";
|
|
|
|
description = "Daniel";
|
|
|
|
extraGroups = [ "wheel" ];
|
2024-12-24 01:41:50 +01:00
|
|
|
shell = pkgs.zsh;
|
2024-01-21 22:55:44 +01:00
|
|
|
openssh.authorizedKeys.keys = [ ssh-keys.Hetzner ssh-keys.DanielsPhone ];
|
2022-07-31 20:33:19 +02:00
|
|
|
};
|
|
|
|
};
|
2022-07-30 18:19:49 +02:00
|
|
|
}
|