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/applications/browser.nix b/modules/applications/browser.nix index 3306487..d7cd97d 100644 --- a/modules/applications/browser.nix +++ b/modules/applications/browser.nix @@ -402,6 +402,18 @@ keyword = "nix function search"; url = "https://noogle.dev"; } + { + name = "EPFL Moodle"; + tags = ["epfl" "moodle"]; + keyword = "epfl moodle"; + url = "https://moodle.epfl.ch/my/courses.php"; + } + { + name = "EPFL ICC Courseware"; + tags = ["icc" "epfl" "courseware"]; + keyword = "icc epfl courseware"; + url = "https://courseware.epfl.ch/learner-dashboard/"; + } ]; }; search = { diff --git a/modules/applications/caelestia.nix b/modules/applications/caelestia.nix index 0201499..55601ee 100644 --- a/modules/applications/caelestia.nix +++ b/modules/applications/caelestia.nix @@ -24,16 +24,16 @@ inhibitWhenAudio = true; timeouts = [ { - timeout = 180; + timeout = 1000; idleAction = "lock"; } { - timeout = 300; + timeout = 1010; idleAction = "dpms off"; # what's that? returnAction = "dpms on"; } { - timeout = 600; + timeout = 12200; idleAction = ["systemctl" "suspend-then-hibernate"]; } ]; diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index e8a01b5..71c045f 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -35,23 +35,22 @@ _: { services.xserver.enable = true; }; flake.homeModules.hyprland-laptop = { - home.file.".config/hypr/host.lua" = { - text = '' - hl.on("hyprland.start", function() - hl.exec_cmd("qtbatticon") - hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen") - end) - - hl.monitor({ - output = "eDP-1", - mode = "highres@highrr", - position = "0x0", - scale = 1, - }) - ''; - enable = true; - force = true; - }; + home.file.".config/hypr/host.lua" = { + text = '' + hl.on("hyprland.start", function() + hl.exec_cmd("qtbatticon") + end) + + hl.monitor({ + output = "eDP-1", + mode = "highres@highrr", + position = "0x0", + scale = 1, + }) + ''; + enable = true; + force = true; + }; }; flake.homeModules.hyprland-desktop = { home.file.".config/hypr/host.lua" = { diff --git a/modules/applications/zsh.nix b/modules/applications/zsh.nix index 03b448f..3bf3835 100644 --- a/modules/applications/zsh.nix +++ b/modules/applications/zsh.nix @@ -43,6 +43,11 @@ _: { enable = true; autosuggestion.enable = false; # zsh-autocomplete is replaced by deja initContent = '' + # those aliases can't be written in nix, because of ö + # l and ö are very close + alias -- ös=ls + alias -- öös=ls + # Safe cat that uses colorize plugin ccat custom-cat() { if [[ -t 1 ]]; then @@ -61,7 +66,11 @@ _: { } eval "$(direnv hook zsh)" eval "$(deja init zsh)" - fastfetch''\n''; + if [[ "$TERM_PROGRAM" != "vscode" ]]; then + fastfetch + fi + + ''; shellAliases = { ".." = "z .."; grep = "rg"; 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; + }; + }; + }; }