2023-06-21 12:21:40 +00:00
|
|
|
args@{ pkgs, config, ... }:
|
2022-07-30 16:19:49 +00:00
|
|
|
|
2022-07-30 20:55:19 +00:00
|
|
|
let
|
2023-06-21 12:21:40 +00:00
|
|
|
secret = import ../../secret/hosts/tanker.nix;
|
2022-07-31 18:33:19 +00:00
|
|
|
ssh-keys = import ../shared/ssh-keys.nix;
|
2022-07-30 20:55:19 +00:00
|
|
|
in
|
2022-07-30 16:19:49 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2023-06-21 12:21:40 +00:00
|
|
|
../../hardware/hosts/tanker.nix
|
|
|
|
../nixos/zfs.nix
|
|
|
|
../../agenix/hosts/tanker/config.nix
|
2023-05-14 19:24:51 +00:00
|
|
|
../shared/show-update-changelog.nix
|
2022-07-30 17:49:04 +00:00
|
|
|
../nixos/ssh.nix
|
2024-01-21 21:55:44 +00:00
|
|
|
../nixos/eternal-terminal.nix
|
2023-06-23 18:08:22 +00:00
|
|
|
../nixos/msmtp.nix
|
2023-06-24 18:19:50 +00:00
|
|
|
../nixos/smartd.nix
|
2022-07-30 17:49:04 +00:00
|
|
|
|
|
|
|
../nixos/git.nix
|
2022-11-29 14:17:23 +00:00
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
../nixos/acme-tanker.nix
|
2023-03-05 22:51:30 +00:00
|
|
|
../nixos/nginx.nix
|
2023-09-04 10:45:06 +00:00
|
|
|
../nixos/nginx-tanker.nix
|
2023-06-21 12:21:40 +00:00
|
|
|
../nixos/postgresql.nix
|
|
|
|
../nixos/elasticsearch.nix
|
|
|
|
../nixos/mosquitto.nix
|
|
|
|
../nixos/container.nix
|
|
|
|
|
|
|
|
../nixos/anonymous-overflow.nix
|
2023-03-05 22:02:49 +00:00
|
|
|
|
2023-02-27 16:53:15 +00:00
|
|
|
../nixos/atuin-sync.nix
|
2023-02-27 16:51:39 +00:00
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
(import ../nixos/atticd.nix (args // { inherit secret; }))
|
2023-04-05 11:12:40 +00:00
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
../nixos/fedifetcher.nix
|
2023-02-15 19:35:46 +00:00
|
|
|
|
2023-09-11 22:05:25 +00:00
|
|
|
../nixos/forgejo.nix
|
2024-02-15 17:21:21 +00:00
|
|
|
(import ../nixos/forgejo-runner.nix (args // { inherit secret; name = "tanker"; tag = "ubuntu-latest-amd64"; nixTag = "amd64"; }))
|
2023-09-11 22:05:25 +00:00
|
|
|
|
2023-09-21 19:38:44 +00:00
|
|
|
../nixos/headscale.nix
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
(import ../nixos/home-proxy.nix (args // { inherit secret; }))
|
2023-01-24 13:33:54 +00:00
|
|
|
|
2023-03-20 12:49:46 +00:00
|
|
|
../nixos/invidious.nix
|
|
|
|
|
2023-12-28 12:55:57 +00:00
|
|
|
(import ../nixos/redlib.nix (args // { inherit secret; }))
|
2023-02-12 21:13:30 +00:00
|
|
|
|
2023-06-25 10:05:52 +00:00
|
|
|
../nixos/linkding.nix
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
../nixos/mastodon.nix
|
|
|
|
|
|
|
|
../nixos/miniflux.nix
|
2022-11-29 14:17:23 +00:00
|
|
|
|
2023-02-18 19:54:15 +00:00
|
|
|
(import ../nixos/ntfy-sh.nix (args // { inherit secret; }))
|
|
|
|
|
2023-08-01 16:32:28 +00:00
|
|
|
../nixos/matrix
|
2022-11-29 14:17:23 +00:00
|
|
|
|
2023-04-04 13:05:39 +00:00
|
|
|
../nixos/tailscale.nix
|
2024-05-25 13:47:17 +00:00
|
|
|
../nixos/tailscale-nodns.nix
|
2022-07-30 18:17:39 +00:00
|
|
|
|
2023-07-11 09:08:34 +00:00
|
|
|
../nixos/websites-tanker.nix
|
2023-07-01 14:17:40 +00:00
|
|
|
|
2023-02-28 13:55:57 +00:00
|
|
|
../../container/proxitok
|
2023-06-21 12:21:40 +00:00
|
|
|
../../container/weewx
|
2022-07-30 16:19:49 +00:00
|
|
|
];
|
|
|
|
|
2022-12-25 21:13:07 +00:00
|
|
|
system.stateVersion = "22.11";
|
|
|
|
|
2022-07-30 16:19:49 +00:00
|
|
|
nix = {
|
2022-09-26 13:23:14 +00:00
|
|
|
package = pkgs.nixVersions.stable;
|
2022-07-30 16:19:49 +00:00
|
|
|
|
2022-08-05 09:37:45 +00:00
|
|
|
settings = {
|
|
|
|
auto-optimise-store = true;
|
2022-07-30 16:19:49 +00:00
|
|
|
|
2022-08-05 09:37:45 +00:00
|
|
|
substituters = [
|
2023-12-14 17:29:26 +00:00
|
|
|
"https://attic.cache.daniel.sx/nifoc-systems?priority=1"
|
|
|
|
"https://attic.cache.daniel.sx/nifoc-ci?priority=2"
|
|
|
|
"https://nix-community.cachix.org?priority=3"
|
2022-08-05 09:37:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
trusted-public-keys = [
|
2023-04-12 18:03:02 +00:00
|
|
|
"nifoc-systems:eDDqVP5BFR6/1KvXbF9oUL8JahDdmbrsYtxlQ57LOTU="
|
2023-09-14 17:39:10 +00:00
|
|
|
"nifoc-ci:JpD9zqVQi8JuS7B8htPDOQZh08rhInMnGFS9RVhiuwk="
|
2022-08-05 09:37:45 +00:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
|
|
|
};
|
2022-07-30 16:19:49 +00:00
|
|
|
|
2022-08-18 21:12:16 +00:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 14d";
|
|
|
|
};
|
|
|
|
|
2022-07-30 16:19:49 +00:00
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
2022-08-07 15:54:05 +00:00
|
|
|
extra-platforms = aarch64-linux
|
2022-07-30 16:19:49 +00:00
|
|
|
keep-derivations = true
|
|
|
|
keep-outputs = true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-08-07 15:54:05 +00:00
|
|
|
boot = {
|
2023-04-17 15:11:07 +00:00
|
|
|
tmp.cleanOnBoot = true;
|
2022-08-07 15:54:05 +00:00
|
|
|
|
|
|
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
};
|
2022-07-30 16:19:49 +00:00
|
|
|
|
2023-03-28 19:50:32 +00:00
|
|
|
networking = {
|
2023-06-21 12:21:40 +00:00
|
|
|
hostName = "tanker";
|
|
|
|
hostId = "d89f488a";
|
2023-03-28 19:50:32 +00:00
|
|
|
useNetworkd = true;
|
|
|
|
};
|
|
|
|
|
2023-07-16 14:28:53 +00: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 22:52:44 +00:00
|
|
|
};
|
2023-07-16 14:28:53 +00:00
|
|
|
|
|
|
|
wait-online.extraArgs = [
|
|
|
|
"--interface=enp41s0"
|
|
|
|
];
|
2023-03-28 15:42:22 +00:00
|
|
|
};
|
2023-05-09 07:15:01 +00:00
|
|
|
|
2023-07-16 14:28:53 +00:00
|
|
|
sleep.extraConfig = ''
|
|
|
|
AllowSuspend=no
|
|
|
|
AllowHibernation=no
|
|
|
|
'';
|
2023-03-28 15:42:22 +00:00
|
|
|
};
|
2022-07-31 13:21:51 +00:00
|
|
|
|
2022-12-01 21:48:43 +00:00
|
|
|
services.journald.extraConfig = ''
|
2023-06-21 12:21:40 +00:00
|
|
|
SystemMaxUse=4G
|
2023-10-11 12:41:14 +00:00
|
|
|
MaxRetentionSec=30day
|
2022-12-01 21:48:43 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-12 21:40:40 +00:00
|
|
|
security.sudo.enable = true;
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
services.zfs.autoScrub.enable = true;
|
|
|
|
|
2023-02-23 20:41:41 +00:00
|
|
|
documentation = {
|
|
|
|
nixos.enable = false;
|
|
|
|
doc.enable = false;
|
|
|
|
};
|
2022-10-24 11:19:23 +00:00
|
|
|
|
2023-07-16 14:28:53 +00:00
|
|
|
fonts.fontconfig.enable = false;
|
|
|
|
sound.enable = false;
|
|
|
|
|
2022-08-01 10:24:30 +00:00
|
|
|
programs.fish.enable = true;
|
2023-06-21 12:21:40 +00:00
|
|
|
programs.htop.enable = true;
|
2022-08-01 10:24:30 +00:00
|
|
|
|
2022-07-31 18:33:19 +00:00
|
|
|
users.users = {
|
|
|
|
root = {
|
2023-06-21 12:21:40 +00:00
|
|
|
openssh.authorizedKeys.keys = [ ssh-keys.Hetzner ssh-keys.BackupTanker ];
|
2022-07-31 18:33:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
daniel = {
|
2023-09-16 11:08:38 +00:00
|
|
|
hashedPasswordFile = config.age.secrets.user-daniel-password.path;
|
2022-07-31 18:33:19 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/daniel";
|
|
|
|
description = "Daniel";
|
|
|
|
extraGroups = [ "wheel" ];
|
2022-08-01 10:24:30 +00:00
|
|
|
shell = pkgs.fish;
|
2024-01-21 21:55:44 +00:00
|
|
|
openssh.authorizedKeys.keys = [ ssh-keys.Hetzner ssh-keys.DanielsPhone ];
|
2022-07-31 18:33:19 +00:00
|
|
|
};
|
|
|
|
};
|
2022-07-30 16:19:49 +00:00
|
|
|
}
|