nixos_config/hosts/inuc/configuration.nix
2026-01-30 18:56:08 +01:00

56 lines
1.2 KiB
Nix

{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
wakeonlan
];
security.sudo.wheelNeedsPassword = false;
imports =
[ ./hardware-configuration.nix ];
networking.hostName = "inuc";
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
}; # end systemd
} # end file