mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-10-11 01:12:43 +02:00
setup for cs-119l
This commit is contained in:
1 parent
7a0454befb
commit
377ec45fad
3 files changed
+42
No files matched your search
@@ -4,4 +4,42 @@ _: {
|
||||
openconnect
|
||||
];
|
||||
};
|
||||
|
||||
flake.nixosModules.cs-119l = {pkgs, ...}:
|
||||
let
|
||||
user = "YOUR_USERNAME";
|
||||
home = "/home/${user}";
|
||||
src = "${home}/epfl/cs-119l-ICC/";
|
||||
dst = "${home}/kdrive/Travaille/2 - Bachelor/Information, calcul, communication CS-119l/";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vscode-fhs
|
||||
];
|
||||
systemd.services.sync-cs119l-to-kdrive = {
|
||||
description = "Sync CS-119l ICC to kDrive";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = user;
|
||||
|
||||
ExecStart =
|
||||
"${pkgs.rsync}/bin/rsync -a '${src}' '${dst}'";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.sync-cs119l-to-kdrive = {
|
||||
description = "Sync CS-119l ICC to kDrive every Thursday and Friday evening";
|
||||
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = [
|
||||
"Thu *-*-* 20:00:00"
|
||||
"Fri *-*-* 20:00:00"
|
||||
];
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user