diff --git a/hosts/server/systemd-primary.nix b/hosts/server/systemd-primary.nix index f7ec3f8..d85ced6 100644 --- a/hosts/server/systemd-primary.nix +++ b/hosts/server/systemd-primary.nix @@ -1,63 +1,65 @@ -{ pkgs, lib, config, ... }: -with lib; -let cfg = config.primary; +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.primary; in { - options.primary = { enable = mkEnableOption "is primary host"; }; + options.primary = {enable = mkEnableOption "is primary host";}; config = mkIf cfg.enable { systemd = { user = { services = { do_agenda = { description = "Send today's agenda"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/do_agenda"; }; }; do_agenda_tomorrow = { description = "Send tomorrow's agenda"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; - ExecStart = "/home/don/bin/do_agenda_tomorrow"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + ExecStart = "/home/don/bin/do_agenda.tomorrow"; }; }; gosleep = { description = "Adjust tailscale MTU based on location"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/gosleep"; }; }; }; timers = { do_agenda = { - wantedBy = [ "timers.target" ]; - partOf = [ "do_agenda.service" ]; + wantedBy = ["timers.target"]; + partOf = ["do_agenda.service"]; timerConfig = { OnCalendar = "05:00"; Unit = "do_agenda.service"; }; }; do_agenda_tomorrow = { - wantedBy = [ "timers.target" ]; - partOf = [ "do_agenda_tomorrow.service" ]; + wantedBy = ["timers.target"]; + partOf = ["do_agenda_tomorrow.service"]; timerConfig = { OnCalendar = "20:00"; Unit = "do_agenda_tomorrow.service"; }; }; gosleep = { - wantedBy = [ "timers.target" ]; - partOf = [ "gosleep.service" ]; + wantedBy = ["timers.target"]; + partOf = ["gosleep.service"]; timerConfig = { OnCalendar = "1m"; Unit = "gosleep.service"; diff --git a/hosts/workstation/kvm.nix b/hosts/workstation/kvm.nix index e7ec5bb..4c4f3d5 100644 --- a/hosts/workstation/kvm.nix +++ b/hosts/workstation/kvm.nix @@ -1,10 +1,23 @@ -{ pkgs, inputs, config, lib, ... }: -with lib; -let cfg = config.roles.kvm; +{ + pkgs, + inputs, + config, + lib, + ... +}: +with lib; let + cfg = config.roles.kvm; in { - options.roles.kvm = { enable = mkEnableOption "roles kvm"; }; + options.roles.kvm = {enable = mkEnableOption "roles kvm";}; config = mkIf cfg.enable { - virtualisation.libvirtd.enable = true; - environment.systemPackages = with pkgs; [ gnome-boxes quickgui quickemu ]; + virtualisation = { + libvirtd = { + enable = true; + }; + waydroid = { + enable = true; + }; + }; + environment.systemPackages = with pkgs; [gnome-boxes quickgui quickemu]; }; } diff --git a/hosts/workstation/systemd-primary.nix b/hosts/workstation/systemd-primary.nix index f7ec3f8..d85ced6 100644 --- a/hosts/workstation/systemd-primary.nix +++ b/hosts/workstation/systemd-primary.nix @@ -1,63 +1,65 @@ -{ pkgs, lib, config, ... }: -with lib; -let cfg = config.primary; +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.primary; in { - options.primary = { enable = mkEnableOption "is primary host"; }; + options.primary = {enable = mkEnableOption "is primary host";}; config = mkIf cfg.enable { systemd = { user = { services = { do_agenda = { description = "Send today's agenda"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/do_agenda"; }; }; do_agenda_tomorrow = { description = "Send tomorrow's agenda"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; - ExecStart = "/home/don/bin/do_agenda_tomorrow"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + ExecStart = "/home/don/bin/do_agenda.tomorrow"; }; }; gosleep = { description = "Adjust tailscale MTU based on location"; - unitConfig = { Type = "simple"; }; + unitConfig = {Type = "simple";}; serviceConfig = { Type = "oneshot"; - Environment = - "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; ExecStart = "/home/don/bin/gosleep"; }; }; }; timers = { do_agenda = { - wantedBy = [ "timers.target" ]; - partOf = [ "do_agenda.service" ]; + wantedBy = ["timers.target"]; + partOf = ["do_agenda.service"]; timerConfig = { OnCalendar = "05:00"; Unit = "do_agenda.service"; }; }; do_agenda_tomorrow = { - wantedBy = [ "timers.target" ]; - partOf = [ "do_agenda_tomorrow.service" ]; + wantedBy = ["timers.target"]; + partOf = ["do_agenda_tomorrow.service"]; timerConfig = { OnCalendar = "20:00"; Unit = "do_agenda_tomorrow.service"; }; }; gosleep = { - wantedBy = [ "timers.target" ]; - partOf = [ "gosleep.service" ]; + wantedBy = ["timers.target"]; + partOf = ["gosleep.service"]; timerConfig = { OnCalendar = "1m"; Unit = "gosleep.service";