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