From c2f733d4c9f1fc703f00d48e4f3a3d0caee6077c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 6 Sep 2026 11:17:17 +0200 Subject: [PATCH] setup for cs-119l --- flake.nix | 3 +++ modules/hosts/laptop.nix | 1 + modules/utilities/epfl.nix | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/flake.nix b/flake.nix index 769abca..ff9895b 100644 --- a/flake.nix +++ b/flake.nix @@ -64,12 +64,15 @@ flake = let system = "x86_64-linux"; unfreePkgs = [ + "code" "hplip" "nvidia-x11" "nvidia-settings" "steam" "steam-unwrapped" "cheatsheet.nvim" + "vscode" + "vscode-fhs" "zoom-us" "zoom" ]; diff --git a/modules/hosts/laptop.nix b/modules/hosts/laptop.nix index 6959944..14873ea 100644 --- a/modules/hosts/laptop.nix +++ b/modules/hosts/laptop.nix @@ -23,6 +23,7 @@ bootloader browsers caelestia + cs-119l # I'm obliged to use vscode. RIP neovim development documentation disk diff --git a/modules/utilities/epfl.nix b/modules/utilities/epfl.nix index 1d221c1..81c469f 100644 --- a/modules/utilities/epfl.nix +++ b/modules/utilities/epfl.nix @@ -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; + }; + }; + }; }