2024-11-05 17:11:58 +01:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
comin,
|
|
|
|
caddy-with-plugins,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-15 23:41:19 +02:00
|
|
|
{
|
|
|
|
modulesPath,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
2024-11-05 17:11:58 +01:00
|
|
|
|
|
|
|
comin.nixosModules.comin
|
|
|
|
|
2024-07-15 23:41:19 +02:00
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
|
|
|
|
2024-08-20 11:44:39 +02:00
|
|
|
./backup.nix
|
2024-07-15 23:41:19 +02:00
|
|
|
./miniflux
|
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
|
|
|
server = true;
|
|
|
|
};
|
|
|
|
nix-common = {
|
|
|
|
enable = true;
|
|
|
|
remote-builders = true;
|
|
|
|
};
|
|
|
|
caddy-proxy = {
|
|
|
|
enable = true;
|
|
|
|
package = caddy-with-plugins.packages.${pkgs.system}.caddy-with-cloudflare;
|
|
|
|
proxyHosts = [
|
|
|
|
{
|
|
|
|
externalHostname = "read.datarift.nl";
|
2024-07-16 00:08:27 +02:00
|
|
|
proxyAddress = "http://${config.services.miniflux.config.LISTEN_ADDR}";
|
2024-07-15 23:41:19 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
tailscale.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
isContainer = true;
|
|
|
|
kernel.sysctl = {
|
2024-07-15 23:57:32 +02:00
|
|
|
"net.core.rmem_max" = 7500000;
|
|
|
|
"net.core.wmem_max" = 7500000;
|
2024-07-15 23:41:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "read";
|
|
|
|
useDHCP = false;
|
|
|
|
useHostResolvConf = false;
|
|
|
|
networkmanager.enable = false;
|
|
|
|
useNetworkd = true;
|
|
|
|
nftables.enable = true;
|
|
|
|
|
|
|
|
firewall.trustedInterfaces = [ "tailscale0" ];
|
|
|
|
};
|
|
|
|
|
2024-11-05 17:11:58 +01:00
|
|
|
services.comin = {
|
|
|
|
enable = true;
|
|
|
|
remotes = [
|
|
|
|
{
|
|
|
|
name = "origin";
|
|
|
|
url = "https://git.datarift.nl/erwin/nixos-config";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-07-15 23:41:19 +02:00
|
|
|
systemd = {
|
|
|
|
services.logrotate-checkconf.enable = false;
|
|
|
|
|
|
|
|
network = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
wait-online.anyInterface = true;
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "eth0";
|
|
|
|
};
|
|
|
|
|
|
|
|
networkConfig = {
|
|
|
|
Address = "10.0.0.207/24";
|
|
|
|
Gateway = "10.0.0.1";
|
|
|
|
DNS = "10.0.0.206";
|
|
|
|
DHCP = "no";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
security = {
|
|
|
|
sudo-rs = {
|
|
|
|
enable = true;
|
|
|
|
execWheelOnly = true;
|
|
|
|
wheelNeedsPassword = false;
|
|
|
|
};
|
|
|
|
sudo.enable = false;
|
|
|
|
};
|
|
|
|
|
2024-11-05 17:41:26 +01:00
|
|
|
programs.rust-motd = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
banner = {
|
2024-11-05 17:46:00 +01:00
|
|
|
color = "red";
|
2024-11-05 17:41:26 +01:00
|
|
|
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
|
|
|
|
};
|
|
|
|
weather = {
|
2024-11-05 17:52:18 +01:00
|
|
|
loc = "De%20Westereen,%20Netherlands";
|
2024-11-05 17:41:26 +01:00
|
|
|
};
|
|
|
|
uptime = {
|
|
|
|
prefix = "up: ";
|
|
|
|
};
|
|
|
|
filesystems = {
|
|
|
|
root = "/";
|
|
|
|
};
|
|
|
|
memory = {
|
|
|
|
swap_pos = "none";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-15 23:41:19 +02:00
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
|
|
|
sops.secrets = {
|
|
|
|
caddy-env = { };
|
2024-07-16 00:03:43 +02:00
|
|
|
miniflux-env = { };
|
2024-08-20 11:44:39 +02:00
|
|
|
miniflux-backup-ssh-key = { };
|
|
|
|
miniflux-backup-pass = { };
|
2024-07-15 23:41:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "24.11";
|
|
|
|
}
|