formating
This commit is contained in:
parent
138fc13f98
commit
fe017602e4
1 changed files with 20 additions and 19 deletions
|
|
@ -1,16 +1,19 @@
|
||||||
{ pkgs, lib, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
readlink = "${pkgs.coreutils}/bin/readlink";
|
readlink = "${pkgs.coreutils}/bin/readlink";
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||||
in {
|
in {
|
||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
systemd-lock-handler = { enable = true; };
|
systemd-lock-handler = {enable = true;};
|
||||||
NetworkManager-wait-online.enable = lib.mkForce false;
|
NetworkManager-wait-online.enable = lib.mkForce false;
|
||||||
systemd-networkd-wait-online.enable = lib.mkForce false;
|
systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||||
clean-keychain = {
|
clean-keychain = {
|
||||||
description = "Clean up .keychain on boot";
|
description = "Clean up .keychain on boot";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.coreutils-full}/bin/rm -rf /home/don/.keychain";
|
ExecStart = "${pkgs.coreutils-full}/bin/rm -rf /home/don/.keychain";
|
||||||
|
|
@ -21,15 +24,14 @@ in {
|
||||||
services = {
|
services = {
|
||||||
swaylock = {
|
swaylock = {
|
||||||
description = "Screen locker for Wayland";
|
description = "Screen locker for Wayland";
|
||||||
documentation = [ "man:swaylock(1)" ];
|
documentation = ["man:swaylock(1)"];
|
||||||
onSuccess = [ "unlock.target" ];
|
onSuccess = ["unlock.target"];
|
||||||
partOf = [ "lock.target" ];
|
partOf = ["lock.target"];
|
||||||
before = [ "lock.target" ];
|
before = ["lock.target"];
|
||||||
wantedBy = [ "lock.target" ];
|
wantedBy = ["lock.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
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/lock.sh -m";
|
ExecStart = "/home/don/bin/lock.sh -m";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 0;
|
RestartSec = 0;
|
||||||
|
|
@ -46,31 +48,30 @@ in {
|
||||||
${notify-send} --urgency=low --icon=system-reboot "Reboot is needed for a NixOS upgrade."
|
${notify-send} --urgency=low --icon=system-reboot "Reboot is needed for a NixOS upgrade."
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
serviceConfig = { Type = "oneshot"; };
|
serviceConfig = {Type = "oneshot";};
|
||||||
};
|
};
|
||||||
check-nic = {
|
check-nic = {
|
||||||
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/check-nic";
|
ExecStart = "/home/don/bin/check-nic";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
timers = {
|
timers = {
|
||||||
check-nic = {
|
check-nic = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = ["timers.target"];
|
||||||
partOf = [ "check-nic.service" ];
|
partOf = ["check-nic.service"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "1m";
|
OnCalendar = "1m";
|
||||||
Unit = "check-nic.service";
|
Unit = "check-nic.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
detect-reboot-for-upgrade = {
|
detect-reboot-for-upgrade = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = ["timers.target"];
|
||||||
partOf = [ "detect-reboot-for-upgrade.service" ];
|
partOf = ["detect-reboot-for-upgrade.service"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "hourly";
|
OnCalendar = "hourly";
|
||||||
Unit = "detect-reboot-for-upgrade.service";
|
Unit = "detect-reboot-for-upgrade.service";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue