This commit is contained in:
steveej 2023-03-08 19:13:59 +01:00
parent 855c463a93
commit 693ae383ef
16 changed files with 63 additions and 474 deletions

View file

@ -1,20 +1,14 @@
{
pkgs,
lib,
config,
...
}: let
{ pkgs
, lib
, config
, ...
}:
let
keys = import ../../../variables/keys.nix;
in {
nix.binaryCaches = ["https://cache.holo.host"];
nix.binaryCachePublicKeys = [
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
"cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
];
in
{
# TASK: new device
networking.hostName = "sj-pvehtz-0"; # Define your hostname.
networking.hostName = "sj-pvehtz0"; # Define your hostname.
# networking.domain = "";
networking.firewall.enable = true;
@ -35,7 +29,7 @@ in {
"prefixLength" = 29;
}
];
ipv6.addresses = [];
ipv6.addresses = [ ];
};
networking.defaultGateway = {
@ -48,11 +42,11 @@ in {
interface = "eth0";
};
networking.nameservers = ["1.1.1.1"];
networking.nameservers = [ "1.1.1.1" ];
networking.nat = {
enable = true;
internalInterfaces = ["ve-+"];
internalInterfaces = [ "ve-+" ];
externalInterface = "eth0";
};
@ -60,35 +54,12 @@ in {
# services.kubernetes.roles = ["master" "node"];
# virtualization
virtualisation = {docker.enable = true;};
virtualisation = { docker.enable = true; };
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
systemd.services."sshd-status" = {
enable = true;
description = "sshd-status service";
path = [pkgs.systemd];
script = ''
systemctl status sshd | grep -i tasks
'';
};
systemd.services.sshd.serviceConfig = {TasksMax = 32;};
systemd.timers."sshd-status" = {
description = "Timer to trigger sshd-status periodically";
enable = true;
wantedBy = ["timer.target" "multi-user.target"];
timerConfig = {
OnActiveSec = "360s";
OnUnitActiveSec = "360s";
AccuracySec = "1s";
Unit = "sshd-status.service";
};
};
nix.gc = {automatic = true;};
nix.gc = { automatic = true; };
networking.useHostResolvConf = true;
@ -100,5 +71,5 @@ in {
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
system.stateVersion = "22.11"; # Did you read the comment?
}