diff --git a/flake.nix b/flake.nix index e6d4455..098d7c5 100644 --- a/flake.nix +++ b/flake.nix @@ -69,12 +69,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 28b8883..41c669e 100644 --- a/modules/hosts/laptop.nix +++ b/modules/hosts/laptop.nix @@ -25,6 +25,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; + }; + }; + }; }