nixos_config/hosts/nuc/configuration.nix
2026-02-03 21:00:27 +01:00

65 lines
1.5 KiB
Nix

{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
wakeonlan
];
security.sudo.wheelNeedsPassword = false;
imports =
[ ./hardware-configuration.nix ];
networking.hostName = "nuc";
boot.initrd.enable = true;
boot.loader = {
systemd-boot = {
enable = true;
}; # end loader.systemd-boot
}; # end boot
virtualisation = {
oci-containers = {
containers = {
}; # end containers
}; # end oci-containers
}; # end virtualisation
networking.firewall.allowedTCPPorts = [
53
80
443
];
networking.firewall.allowedUDPPorts = [
53
];
systemd = {
timers = {
"autowin" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "Wed *-*-21..28 02:00:00";
Unit = "autowin.service";
};
};
}; # end timers
services = {
"autowin" = {
script = ''
${pkgs.python3Packages.python}/bin/python /home/alisceon/.nixos_config/util/wol_man.py autowin
'';
serviceConfig = {
Type = "oneshot";
TimeoutStartSec = "3600";
User = "alisceon";
};
}; # end "hello-world"
}; # end services
virtualisation.oci-containers.containers = {
isponsorblocktv = {
image = "ghcr.io/dmunozv04/isponsorblocktv:latest";
autoStart = true;
volumes = [
"/home/alisceon/isponsorblocktv:/app/data"
];
}; # end isponsorblocktv
};
}; # end systemd
} # end file