Changes
This commit is contained in:
parent
def078abfc
commit
d448ebcbed
7 changed files with 24 additions and 16 deletions
|
|
@ -40,7 +40,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.sessionVariables = rec {
|
environment.sessionVariables = rec {
|
||||||
TERM = "kitty"
|
TERM = "kitty";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
./users
|
./users
|
||||||
./boot
|
./boot
|
||||||
./base
|
./base
|
||||||
|
./timers
|
||||||
./username.nix
|
./username.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,23 +17,21 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assert homeCfg.network.syncthing || throw "Syncthing has not been enabled on this machine, refusing to add timer.";
|
systemd.timers."backupSyncthing" = {
|
||||||
|
wantedBy = ["timers.target"];
|
||||||
systemd.timers."backupsyncthing" = {
|
timerConfig = {
|
||||||
wantedby = ["timers.target"];
|
onCalendar = "weekly";
|
||||||
timerconfig = {
|
Persistent = true;
|
||||||
oncalendar = "weekly";
|
|
||||||
persistent = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."backupsyncthing" = {
|
systemd.services."backupSyncthing" = {
|
||||||
script = ''
|
script = ''
|
||||||
/home/horseman/nix-config/misc/backup.sh
|
/home/horseman/nix-config/misc/backup.sh
|
||||||
'';
|
'';
|
||||||
serviceconfig = {
|
serviceConfig = {
|
||||||
type = "oneshot";
|
Type = "oneshot";
|
||||||
user = "horseman";
|
User = "horseman";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
10
modules/timers/default.nix
Normal file
10
modules/timers/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
headless,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./wol.nix
|
||||||
|
./backup.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -17,8 +17,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assert homeCfg.apps.terminal || throw "wakeonlan has not been not installed on this machine, refusing to add timer.";
|
|
||||||
|
|
||||||
systemd.timers."enable-wol" = {
|
systemd.timers."enable-wol" = {
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = ["timers.target"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ in {
|
||||||
cd /home/horseman && \
|
cd /home/horseman && \
|
||||||
rm -r .config/qtile && \
|
rm -r .config/qtile && \
|
||||||
cp -r nix-config/modules/wm/qtile/config \
|
cp -r nix-config/modules/wm/qtile/config \
|
||||||
.config/qtile
|
.config/qtile && \
|
||||||
|
sudo chown -R horseman:users .config/qtile
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue