formating

This commit is contained in:
Don Harper 2025-11-24 20:17:47 -06:00
parent 5d0e955ddb
commit ebbb867b0c
3 changed files with 63 additions and 46 deletions

View file

@ -1,63 +1,65 @@
{ pkgs, lib, config, ... }: {
with lib; pkgs,
let cfg = config.primary; lib,
config,
...
}:
with lib; let
cfg = config.primary;
in { in {
options.primary = { enable = mkEnableOption "is primary host"; }; options.primary = {enable = mkEnableOption "is primary host";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd = { systemd = {
user = { user = {
services = { services = {
do_agenda = { do_agenda = {
description = "Send today's agenda"; description = "Send today's agenda";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/do_agenda"; ExecStart = "/home/don/bin/do_agenda";
}; };
}; };
do_agenda_tomorrow = { do_agenda_tomorrow = {
description = "Send tomorrow's agenda"; description = "Send tomorrow's agenda";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/do_agenda.tomorrow";
ExecStart = "/home/don/bin/do_agenda_tomorrow";
}; };
}; };
gosleep = { gosleep = {
description = "Adjust tailscale MTU based on location"; description = "Adjust tailscale MTU based on location";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/gosleep"; ExecStart = "/home/don/bin/gosleep";
}; };
}; };
}; };
timers = { timers = {
do_agenda = { do_agenda = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "do_agenda.service" ]; partOf = ["do_agenda.service"];
timerConfig = { timerConfig = {
OnCalendar = "05:00"; OnCalendar = "05:00";
Unit = "do_agenda.service"; Unit = "do_agenda.service";
}; };
}; };
do_agenda_tomorrow = { do_agenda_tomorrow = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "do_agenda_tomorrow.service" ]; partOf = ["do_agenda_tomorrow.service"];
timerConfig = { timerConfig = {
OnCalendar = "20:00"; OnCalendar = "20:00";
Unit = "do_agenda_tomorrow.service"; Unit = "do_agenda_tomorrow.service";
}; };
}; };
gosleep = { gosleep = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "gosleep.service" ]; partOf = ["gosleep.service"];
timerConfig = { timerConfig = {
OnCalendar = "1m"; OnCalendar = "1m";
Unit = "gosleep.service"; Unit = "gosleep.service";

View file

@ -1,10 +1,23 @@
{ pkgs, inputs, config, lib, ... }: {
with lib; pkgs,
let cfg = config.roles.kvm; inputs,
config,
lib,
...
}:
with lib; let
cfg = config.roles.kvm;
in { in {
options.roles.kvm = { enable = mkEnableOption "roles kvm"; }; options.roles.kvm = {enable = mkEnableOption "roles kvm";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.libvirtd.enable = true; virtualisation = {
environment.systemPackages = with pkgs; [ gnome-boxes quickgui quickemu ]; libvirtd = {
enable = true;
};
waydroid = {
enable = true;
};
};
environment.systemPackages = with pkgs; [gnome-boxes quickgui quickemu];
}; };
} }

View file

@ -1,63 +1,65 @@
{ pkgs, lib, config, ... }: {
with lib; pkgs,
let cfg = config.primary; lib,
config,
...
}:
with lib; let
cfg = config.primary;
in { in {
options.primary = { enable = mkEnableOption "is primary host"; }; options.primary = {enable = mkEnableOption "is primary host";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd = { systemd = {
user = { user = {
services = { services = {
do_agenda = { do_agenda = {
description = "Send today's agenda"; description = "Send today's agenda";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/do_agenda"; ExecStart = "/home/don/bin/do_agenda";
}; };
}; };
do_agenda_tomorrow = { do_agenda_tomorrow = {
description = "Send tomorrow's agenda"; description = "Send tomorrow's agenda";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/do_agenda.tomorrow";
ExecStart = "/home/don/bin/do_agenda_tomorrow";
}; };
}; };
gosleep = { gosleep = {
description = "Adjust tailscale MTU based on location"; description = "Adjust tailscale MTU based on location";
unitConfig = { Type = "simple"; }; unitConfig = {Type = "simple";};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/gosleep"; ExecStart = "/home/don/bin/gosleep";
}; };
}; };
}; };
timers = { timers = {
do_agenda = { do_agenda = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "do_agenda.service" ]; partOf = ["do_agenda.service"];
timerConfig = { timerConfig = {
OnCalendar = "05:00"; OnCalendar = "05:00";
Unit = "do_agenda.service"; Unit = "do_agenda.service";
}; };
}; };
do_agenda_tomorrow = { do_agenda_tomorrow = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "do_agenda_tomorrow.service" ]; partOf = ["do_agenda_tomorrow.service"];
timerConfig = { timerConfig = {
OnCalendar = "20:00"; OnCalendar = "20:00";
Unit = "do_agenda_tomorrow.service"; Unit = "do_agenda_tomorrow.service";
}; };
}; };
gosleep = { gosleep = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "gosleep.service" ]; partOf = ["gosleep.service"];
timerConfig = { timerConfig = {
OnCalendar = "1m"; OnCalendar = "1m";
Unit = "gosleep.service"; Unit = "gosleep.service";