2023-02-07 18:23:51 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
2023-04-15 12:21:22 +02:00
|
|
|
nodeName,
|
2023-02-07 18:23:51 +01:00
|
|
|
...
|
|
|
|
}: let
|
2022-11-19 16:33:35 -06:00
|
|
|
passwords = import ../../../variables/passwords.crypt.nix;
|
2020-12-21 14:35:50 +01:00
|
|
|
in {
|
2023-05-23 18:11:30 +02:00
|
|
|
nix.settings = {
|
|
|
|
substituters = [
|
2023-04-15 12:21:22 +02:00
|
|
|
"https://holochain-ci.cachix.org"
|
|
|
|
# "https://cache.holo.host/"
|
|
|
|
];
|
2023-05-23 18:11:30 +02:00
|
|
|
trusted-public-keys = [
|
2021-08-20 23:28:23 +02:00
|
|
|
"holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8="
|
2023-04-15 12:21:22 +02:00
|
|
|
# "cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
|
|
|
|
# "cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
|
2021-08-20 23:28:23 +02:00
|
|
|
];
|
2023-01-26 11:27:09 +01:00
|
|
|
|
2023-05-23 18:11:30 +02:00
|
|
|
extra-experimental-features = ["impure-derivations"];
|
|
|
|
system-features = ["recursive-nix"];
|
2021-08-20 23:28:23 +02:00
|
|
|
};
|
2020-12-21 14:35:50 +01:00
|
|
|
|
2023-02-07 18:23:51 +01:00
|
|
|
networking.bridges."virbr1".interfaces = [];
|
|
|
|
networking.interfaces."virbr1".ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "10.254.254.254";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
networking.firewall.enable = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
services.openssh.openFirewall = false;
|
|
|
|
|
|
|
|
# TODO: upstream feature for inverse rule to work: `! --in-interface zt+`
|
|
|
|
networking.firewall.interfaces."eth+".allowedTCPPorts = [
|
|
|
|
22
|
|
|
|
|
2020-12-21 14:35:50 +01:00
|
|
|
# syncthing
|
|
|
|
22000
|
|
|
|
|
|
|
|
# iperf3
|
|
|
|
5201
|
|
|
|
];
|
2023-05-21 11:58:57 +02:00
|
|
|
networking.firewall.interfaces."eth+".allowedUDPPorts = [
|
|
|
|
# syncthing
|
|
|
|
22000 21027
|
|
|
|
];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
networking.firewall.logRefusedConnections = false;
|
|
|
|
networking.usePredictableInterfaceNames = false;
|
|
|
|
|
2023-04-15 12:21:22 +02:00
|
|
|
services.fwupd.enable = true;
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
services.fprintd.enable = true;
|
|
|
|
security.pam.services = {
|
|
|
|
login.fprintAuth = true;
|
|
|
|
sudo.fprintAuth = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# virtualization
|
|
|
|
virtualisation = {
|
2023-02-07 18:23:51 +01:00
|
|
|
libvirtd = {enable = true;};
|
2020-12-21 14:35:50 +01:00
|
|
|
|
|
|
|
virtualbox.host = {
|
2022-10-31 11:04:38 +01:00
|
|
|
enable = false;
|
2020-12-21 14:35:50 +01:00
|
|
|
addNetworkInterface = false;
|
|
|
|
};
|
|
|
|
|
2023-04-15 12:21:22 +02:00
|
|
|
podman = {
|
2020-12-21 14:35:50 +01:00
|
|
|
enable = true;
|
2023-04-15 12:21:22 +02:00
|
|
|
dockerCompat = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
# defaultNetwork.dnsname.enable = true;
|
2020-12-21 14:35:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-10 17:49:31 +01:00
|
|
|
services.samba.extraConfig = ''
|
|
|
|
# client min protocol = NT1
|
|
|
|
'';
|
|
|
|
|
2023-02-07 18:23:51 +01:00
|
|
|
security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"];
|
2020-12-21 14:35:50 +01:00
|
|
|
|
2023-02-07 18:23:51 +01:00
|
|
|
services.xserver.videoDrivers = lib.mkForce ["amdgpu"];
|
2020-12-21 14:35:50 +01:00
|
|
|
services.xserver.serverFlagsSection = ''
|
|
|
|
Option "BlankTime" "0"
|
|
|
|
Option "StandbyTime" "0"
|
|
|
|
Option "SuspendTime" "0"
|
|
|
|
Option "OffTime" "0"
|
|
|
|
'';
|
|
|
|
|
2022-11-19 16:33:35 -06:00
|
|
|
time.timeZone = lib.mkForce passwords.timeZone.stefan;
|
|
|
|
|
2020-12-21 14:35:50 +01:00
|
|
|
hardware.ledger.enable = true;
|
2023-05-21 11:58:57 +02:00
|
|
|
|
|
|
|
services.zerotierone = {
|
|
|
|
enable = true;
|
|
|
|
joinNetworks = [
|
|
|
|
"93afae5963c547f1"
|
|
|
|
];
|
|
|
|
};
|
2020-12-21 14:35:50 +01:00
|
|
|
}
|