2021-03-18 14:03:09 +04:00
|
|
|
{ config, inputs, ... }: {
|
2021-01-22 21:44:23 +04:00
|
|
|
imports = [
|
2021-01-22 00:19:07 +04:00
|
|
|
./hardware-configuration.nix
|
|
|
|
inputs.self.nixosProfiles.desktop
|
2021-06-07 19:22:59 +04:00
|
|
|
inputs.self.nixosModules.print-scan
|
2021-01-22 00:19:07 +04:00
|
|
|
];
|
2021-01-21 22:13:53 +04:00
|
|
|
deviceSpecific.devInfo = {
|
|
|
|
cpu = {
|
|
|
|
vendor = "amd";
|
|
|
|
clock = 4200;
|
|
|
|
cores = 8;
|
|
|
|
};
|
|
|
|
drive = {
|
|
|
|
type = "ssd";
|
|
|
|
speed = 6000;
|
|
|
|
size = 250;
|
|
|
|
};
|
|
|
|
bigScreen = true;
|
|
|
|
ram = 32;
|
|
|
|
};
|
2021-02-01 20:54:45 +04:00
|
|
|
deviceSpecific.isHost = true;
|
2021-01-21 22:13:53 +04:00
|
|
|
services.apcupsd.enable = true;
|
2021-01-26 23:07:06 +04:00
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
2021-03-18 14:03:09 +04:00
|
|
|
|
|
|
|
|
2021-03-27 13:32:40 +04:00
|
|
|
secrets.wireguard-wg0 = { };
|
2021-03-18 14:03:09 +04:00
|
|
|
|
2021-03-27 13:32:40 +04:00
|
|
|
# networking.wireguard.interfaces.serokell = {
|
|
|
|
# listenPort = 51820;
|
|
|
|
# ips = [
|
|
|
|
# "172.20.0.52/32"
|
|
|
|
# # "fd73:7272:ed50::52/128"
|
|
|
|
# ];
|
|
|
|
# privateKeyFile = config.secrets.wireguard-serokell.decrypted;
|
|
|
|
# peers = [{
|
|
|
|
# allowedIPs = [
|
|
|
|
# "0.0.0.0/0"
|
|
|
|
# # "::/0"
|
|
|
|
# ];
|
|
|
|
# # endpoint = "serokell.net:35944";
|
|
|
|
# endpoint = "147.75.100.17:35944";
|
|
|
|
# publicKey = "sgLUARawWJejANs2CwuCptwJO55c4jkmnP0L14FNCyw=";
|
|
|
|
# persistentKeepalive = 24;
|
|
|
|
# }];
|
|
|
|
# };
|
|
|
|
|
|
|
|
services.ezwg = {
|
|
|
|
enable = true;
|
|
|
|
proxy = true;
|
|
|
|
lanSize = 32;
|
|
|
|
serverIP = "147.75.100.17";
|
|
|
|
serverPort = 35944;
|
|
|
|
serverKey = "sgLUARawWJejANs2CwuCptwJO55c4jkmnP0L14FNCyw=";
|
|
|
|
privateKeyFile = config.secrets.wireguard-wg0.decrypted;
|
|
|
|
vlanIP = "172.20.0.52";
|
2021-03-18 14:03:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
# restart when the service fails to resolve DNS
|
|
|
|
systemd.services.wireguard-serokell.serviceConfig = {
|
|
|
|
Restart = "on-failure";
|
|
|
|
RestartSec = "30s";
|
|
|
|
};
|
2021-01-21 22:13:53 +04:00
|
|
|
}
|