Upgrade to NixOS 23.05 and SSD boot
This commit is contained in:
@@ -14,6 +14,7 @@ in {
|
||||
};
|
||||
|
||||
# Fetch hosts-blocklists daily
|
||||
# FIXME Download the list if the file doesn't exist the first time
|
||||
systemd.services.download-dns-blocklist = {
|
||||
description = "Download hosts-blocklists";
|
||||
wantedBy = [ "default.target" ];
|
||||
@@ -25,16 +26,16 @@ in {
|
||||
serviceConfig.Type = "oneshot";
|
||||
postStop = ''
|
||||
chown -R dnsmasq ${stateDir}
|
||||
systemctl restart dnsmasq
|
||||
'';
|
||||
requiredBy = [ "dnsmasq.service" ];
|
||||
after = [ "wireguard-wg0.service" ];
|
||||
startAt = "02:00:00";
|
||||
};
|
||||
|
||||
# Enable SATA HAT
|
||||
# Enable SATA HAT fans
|
||||
systemd.services.sata-hat = {
|
||||
description = "Enable software support for SATA Hat";
|
||||
wantedBy = [ "zfs-import.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
script = ''
|
||||
${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh on"
|
||||
'';
|
||||
@@ -45,30 +46,6 @@ in {
|
||||
${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh off"
|
||||
'';
|
||||
};
|
||||
before = [ "zfs-import.target" "zfs-import-vault.service" "umount.target" ];
|
||||
requires = [ "systemd-udev-settle.service" ];
|
||||
after = [ "systemd-udev-settle.service" ];
|
||||
conflicts = [ "umount.target" ];
|
||||
requiredBy = [ "syncthing.service" "radicale.service" "gitea.service" ];
|
||||
};
|
||||
|
||||
# HACK: restart services dependent on ZFS afer mount
|
||||
systemd.services.restart-services-mount = {
|
||||
description = "Restart services after the ZFS dataset is mounted";
|
||||
wantedBy = [ "default.target" ];
|
||||
script = ''
|
||||
sleep 5
|
||||
systemctl restart syncthing
|
||||
systemctl restart radicale
|
||||
systemctl restart gitea
|
||||
systemctl restart podman-openbooks
|
||||
systemctl restart podman-mqtt2prometheus
|
||||
systemctl restart podman-mongodb
|
||||
systemctl restart podman-nightscout
|
||||
'';
|
||||
serviceConfig.Type = "oneshot";
|
||||
requires = [ "sata-hat.service" ];
|
||||
after = [ "vault.mount" ];
|
||||
};
|
||||
|
||||
# Idle HDDs when not used
|
||||
|
||||
Reference in New Issue
Block a user