Switch to autofs and upgrade Doom Emacs daily
This commit is contained in:
parent
60bda7ed7a
commit
38d5815291
|
@ -44,7 +44,6 @@
|
||||||
export SDL_VIDEODRIVER=wayland
|
export SDL_VIDEODRIVER=wayland
|
||||||
export GTK_THEME=Adapta-Eta
|
export GTK_THEME=Adapta-Eta
|
||||||
'';
|
'';
|
||||||
wrapperFeatures.gtk = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Backlight
|
# Backlight
|
||||||
|
@ -172,34 +171,37 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Automount external storage
|
# Automount external storage
|
||||||
systemd.mounts = [
|
services.autofs = {
|
||||||
# USB
|
enable = true;
|
||||||
{
|
timeout = 5;
|
||||||
what = "/dev/sdb1";
|
autoMaster = let
|
||||||
where = "/usb";
|
mapConf = pkgs.writeText "auto" ''
|
||||||
mountConfig = { TimeoutSec = "5"; };
|
usb -fstype=auto :/dev/sdb1
|
||||||
}
|
sdcard -fstype=auto :/dev/mmcblk0p1
|
||||||
# SD card
|
'';
|
||||||
{
|
in ''
|
||||||
what = "/dev/mmcblk0p1";
|
/media file:${mapConf} --timeout=5
|
||||||
where = "/sdcard";
|
'';
|
||||||
mountConfig = { TimeoutSec = "5"; };
|
};
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.automounts = [
|
# Upgrade Doom Emacs daily
|
||||||
# USB
|
systemd.user.services.doom-upgrade = {
|
||||||
{
|
description = "Upgrade Doom Emacs";
|
||||||
where = "/usb";
|
wantedBy = [ "default.target" ];
|
||||||
automountConfig = { TimeoutIdleSec = "5"; };
|
path = [ pkgs.emacs pkgs.git ];
|
||||||
wantedBy = [ "default.target" ];
|
serviceConfig = {
|
||||||
}
|
Type = "oneshot";
|
||||||
# SD card
|
ExecStart = "/bin/sh /home/coolneng/.emacs.d/bin/doom -y upgrade";
|
||||||
{
|
};
|
||||||
where = "/sdcard";
|
};
|
||||||
automountConfig = { TimeoutIdleSec = "5"; };
|
|
||||||
wantedBy = [ "default.target" ];
|
systemd.user.timers.doom-upgrade = {
|
||||||
}
|
description = "Daily upgrade of Doom Emacs";
|
||||||
];
|
wantedBy = [ "default.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "20:00:00";
|
||||||
|
Unit = "doom-upgrade.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue