Commit 5f3d403fcfa0

Vincent Demeester <vincent@sbr.pm>
2020-10-02 12:29:31
systems/hokkaido: add nightthemeswitcher
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 7d66e8a
Changed files (3)
pkgs
gnome
extensions
nightthemeswitcher
users
vincent
desktop
pkgs/gnome/extensions/nightthemeswitcher/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitLab, glib, gettext, bash, nodePackages, gnome3, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "nightthemeswitcher-gnome-shell-extension";
+  version = "v39";
+
+  src = fetchFromGitLab {
+    owner = "rmnvgr";
+    repo = "nightthemeswitcher-gnome-shell-extension";
+    rev = "${version}";
+    sha256 = "0lciranfqvp14vr1jh9syj0vx2vpiy2zww0m4pw9pay1nis37izf";
+  };
+
+  nativeBuildInputs = [
+    glib
+    gettext
+    nodePackages.typescript
+    gnome3.gnome-shell
+    unzip
+  ];
+
+  uuid = "nightthemeswitcher@romainvigier.fr";
+
+  installPhase = ''
+    mkdir -p $out/share/gnome-shell/extensions
+    unzip build/${uuid}.shell-extension.zip -d $out/share/gnome-shell/extensions/${uuid}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Automatically toggle your light and dark GTK, GNOME Shell, icon and cursor themes variants, switch backgrounds and run custom commands at sunset and sunrise.";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ vdemeester ];
+    homepage = "https://github.com/rmnvgr/nightthemeswitcher-gnome-shell-extension";
+  };
+}
pkgs/default.nix
@@ -120,4 +120,5 @@ rec {
   gnome-bluetooth-quick-connect = pkgs.callPackage ./gnome/extensions/bluetooth-quick-connect { };
   hidetopbar = pkgs.callPackage ./gnome/extensions/hide-top-bar { };
   noannoyance = pkgs.callPackage ./gnome/extensions/noannoyance { };
+  nightthemeswitcher = pkgs.callPackage ./gnome/extensions/nightthemeswitcher { };
 }
users/vincent/desktop/gnome.nix
@@ -32,6 +32,7 @@
     my.gnome-bluetooth-quick-connect
     my.hidetopbar
     my.noannoyance
+    my.nightthemeswitcher
     gnome3.gnome-shell-extensions
 
     pop-gtk-theme