49 lines
1 KiB
Nix
49 lines
1 KiB
Nix
|
|
{ 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";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
virtualisation.oci-containers.containers.isponsorblocktv = {
|
||
|
|
image = "ghcr.io/dmunozv04/isponsorblocktv:latest";
|
||
|
|
autoStart = true;
|
||
|
|
volumes = [
|
||
|
|
"/home/alisceon/isponsorblocktv:/app/data"
|
||
|
|
];
|
||
|
|
};
|
||
|
|
}
|