2024-01-08 07:49:51 +03:00
|
|
|
{ pkgs
|
|
|
|
, abs
|
|
|
|
, inputs
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(abs "hosts/nixos-common.nix")
|
2024-03-03 06:32:03 +03:00
|
|
|
(abs "users/teidesu/server.nix")
|
2024-11-23 16:37:34 +03:00
|
|
|
(abs "lib/desu")
|
2024-01-08 07:49:51 +03:00
|
|
|
./hardware-configuration.nix
|
|
|
|
|
|
|
|
./partials/fde.nix
|
2024-08-05 10:26:36 +03:00
|
|
|
./partials/docker.nix
|
2024-09-19 15:05:13 +03:00
|
|
|
./partials/avahi.nix
|
2024-01-08 07:49:51 +03:00
|
|
|
|
|
|
|
./services/coredns.nix
|
2024-05-11 07:16:10 +03:00
|
|
|
./services/sing-box.nix
|
2024-01-08 07:49:51 +03:00
|
|
|
./services/nginx.nix
|
2024-06-06 15:14:49 +03:00
|
|
|
./services/phpfront.nix
|
2024-08-05 10:26:36 +03:00
|
|
|
./services/postgresql.nix
|
2024-04-15 11:58:54 +03:00
|
|
|
./services/landing
|
2024-11-30 20:11:32 +03:00
|
|
|
./services/geesefs.nix
|
2024-12-11 08:59:22 +03:00
|
|
|
./services/actions-runner
|
2024-01-08 07:49:51 +03:00
|
|
|
|
|
|
|
./containers/torrent.nix
|
2024-12-02 05:53:58 +03:00
|
|
|
./containers/soulseek
|
2024-06-06 13:10:13 +03:00
|
|
|
./containers/vaultwarden.nix
|
2024-09-18 01:04:59 +03:00
|
|
|
./containers/sftpgo
|
2024-07-16 22:57:04 +03:00
|
|
|
./containers/verdaccio
|
2024-05-28 13:10:22 +03:00
|
|
|
./containers/pds
|
2024-11-30 20:11:32 +03:00
|
|
|
./containers/navidrome
|
2024-08-29 23:15:50 +03:00
|
|
|
./containers/conduwuit
|
2024-06-06 13:10:13 +03:00
|
|
|
./containers/zond
|
2024-12-26 11:25:39 +03:00
|
|
|
./containers/zitadel
|
2024-09-19 17:39:18 +03:00
|
|
|
./containers/siyuan
|
2024-10-26 23:35:48 +03:00
|
|
|
./containers/memos
|
2024-11-13 22:56:10 +03:00
|
|
|
./containers/wakapi
|
2024-12-26 11:25:39 +03:00
|
|
|
./containers/outline
|
2024-08-03 09:36:05 +03:00
|
|
|
./containers/teisu.nix
|
2024-07-17 01:09:32 +03:00
|
|
|
./containers/bots/pcre-sub-bot.nix
|
2024-08-07 19:40:47 +03:00
|
|
|
./containers/bots/channel-logger-bot.nix
|
2024-12-26 11:25:39 +03:00
|
|
|
./containers/bots/bsky-crossposter
|
2024-01-08 07:49:51 +03:00
|
|
|
./vms/hass.nix
|
2024-06-06 13:10:13 +03:00
|
|
|
./vms/bnuuy.nix
|
2024-01-08 07:49:51 +03:00
|
|
|
# ./vms/windows.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "koi";
|
|
|
|
# nftables.enable = true;
|
|
|
|
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces = {
|
|
|
|
br0 = {
|
|
|
|
ipv4.addresses = [{
|
|
|
|
address = "10.42.0.2";
|
|
|
|
prefixLength = 16;
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
bridges = {
|
|
|
|
br0 = {
|
|
|
|
interfaces = [ "enp2s0" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nat = {
|
|
|
|
enable = true;
|
|
|
|
internalInterfaces = [ "ve-+" "vb-+" "veth+" ];
|
|
|
|
externalInterface = "br0";
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultGateway = {
|
|
|
|
address = "10.42.0.1";
|
|
|
|
interface = "br0";
|
|
|
|
};
|
|
|
|
nameservers = [
|
|
|
|
"127.0.0.1"
|
|
|
|
"8.8.8.8"
|
|
|
|
"8.8.4.4"
|
|
|
|
];
|
2024-12-26 11:25:39 +03:00
|
|
|
|
|
|
|
firewall.logRefusedConnections = false;
|
2024-01-08 07:49:51 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
virtualisation.libvirtd = {
|
|
|
|
enable = true;
|
|
|
|
qemu.ovmf.enable = true;
|
|
|
|
allowedBridges = [ "br0" ];
|
|
|
|
};
|
2024-06-06 13:10:13 +03:00
|
|
|
|
2024-01-08 07:49:51 +03:00
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options kvm_amd avic=1 nested=0
|
|
|
|
options kvm ignore_msrs=N report_ignored_msrs=Y
|
|
|
|
'';
|
|
|
|
|
|
|
|
hardware.bluetooth.enable = true;
|
2024-04-23 13:24:56 +03:00
|
|
|
security.pam.loginLimits = [{
|
|
|
|
domain = "*";
|
|
|
|
type = "soft";
|
|
|
|
item = "nofile";
|
|
|
|
value = "8192";
|
|
|
|
}];
|
2024-08-04 02:24:50 +03:00
|
|
|
|
2024-08-29 23:15:50 +03:00
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
2024-12-26 11:25:39 +03:00
|
|
|
boot.kernelParams = [ "panic=5" "panic_on_oops=1" "mitigations=off" ];
|
2024-11-14 22:07:56 +03:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2024-08-29 23:15:50 +03:00
|
|
|
|
2024-08-04 02:24:50 +03:00
|
|
|
services.desu-deploy = {
|
|
|
|
enable = true;
|
|
|
|
key = builtins.readFile (abs "ssh/desu-deploy.pub");
|
|
|
|
};
|
2024-01-08 07:49:51 +03:00
|
|
|
}
|
|
|
|
|