nixos_config/nixos/hosts/nuc/configuration.nix

41 lines
836 B
Nix
Raw Normal View History

2026-03-10 21:50:51 +01:00
{ pkgs, repoRoot, ... }:
{
imports = [ ./hardware-configuration.nix ];
environment.systemPackages = with pkgs; [
wakeonlan
];
security.sudo.wheelNeedsPassword = false;
networking.hostName = "nuc";
boot.initrd.enable = true;
boot.loader.systemd-boot.enable = true;
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";
};
};
systemd.services.autowin = {
script = ''
${pkgs.python3Packages.python}/bin/python ${repoRoot}/util/wol_man.py autowin
'';
serviceConfig = {
Type = "oneshot";
TimeoutStartSec = "3600";
User = "alisceon";
};
};
}