about summary refs log tree commit diff
path: root/modules/nixos
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-11-09 03:00:14 +0300
committerAzat Bahawi <azat@bahawi.net>2023-11-09 03:00:14 +0300
commit303b8e2ed8b836858b4dc6ca2210178ace9c6b6f (patch)
treeeb0f4fbda60c70e86921109033c842fca1b3824f /modules/nixos
parent2023-11-05 (diff)
2023-11-09
Diffstat (limited to 'modules/nixos')
-rw-r--r--modules/nixos/default.nix2
-rw-r--r--modules/nixos/firefox/userContent.css1
-rw-r--r--modules/nixos/fonts.nix55
-rw-r--r--modules/nixos/monitoring/default.nix5
-rw-r--r--modules/nixos/mpv.nix89
-rw-r--r--modules/nixos/zathura.nix15
6 files changed, 150 insertions, 17 deletions
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 1b1ec75..35694f4 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -33,6 +33,7 @@ _: {
     ./matrix
     ./monitoring
     ./mpd.nix
+    ./mpv.nix
     ./murmur.nix
     ./nextcloud.nix
     ./nginx.nix
@@ -68,5 +69,6 @@ _: {
     ./wireguard.nix
     ./x11.nix
     ./xmonad.nix
+    ./zathura.nix
   ];
 }
diff --git a/modules/nixos/firefox/userContent.css b/modules/nixos/firefox/userContent.css
index 9d59704..8615990 100644
--- a/modules/nixos/firefox/userContent.css
+++ b/modules/nixos/firefox/userContent.css
@@ -54,7 +54,6 @@
     .js-user-status-item,
     .protip,
     .pt-3.mt-3.d-none.d-md-block, /* Profile achievements. */
-    .text-small.color-fg-muted, /* Useless tips. */
     .user-status-circle-badge-container,
     .user-status-container,
     a[href^="/account/choose?action=upgrade"],
diff --git a/modules/nixos/fonts.nix b/modules/nixos/fonts.nix
index f11a27d..f9624ec 100644
--- a/modules/nixos/fonts.nix
+++ b/modules/nixos/fonts.nix
@@ -1,6 +1,7 @@
 {
   config,
   lib,
+  pkgs,
   ...
 }:
 with lib; let
@@ -8,36 +9,58 @@ with lib; let
 in {
   config = mkMerge [
     (mkIf cfg.enable {
+      nixfiles.modules.common.nix.allowedUnfreePackages = ["symbola"];
       hm.fonts.fontconfig.enable = true;
       fonts = {
-        inherit (cfg) packages;
+        packages = cfg.packages ++ [pkgs.symbola];
 
         fontconfig = {
           enable = true;
 
           defaultFonts = {
-            monospace = [
+            emoji = mkForce [
+              "Twitter Color Emoji"
+              "Noto Color Emoji"
+              "Symbola"
+            ];
+            monospace = mkForce [
               "Iosevka"
-              "Sarasa Mono K"
-              "Sarasa Mono J"
-              "Sarasa Mono SC"
-              "Sarasa Mono CL"
+              "Sarasa Mono"
+              "Source Han Mono"
+              "Noto Sans Mono"
             ];
-            sansSerif = [
+            sansSerif = mkForce [
               "Iosevka Aile"
-              "Sarasa Gothic K"
-              "Sarasa Gothic J"
-              "Sarasa Gothic SC"
-              "Sarasa Gothic CL"
+              "Sarasa Gothic"
+              "Source Han Sans"
+              "Noto Sans"
             ];
-            serif = [
+            serif = mkForce [
               "Iosevka Etoile"
-              "Sarasa Gothic K"
-              "Sarasa Gothic J"
-              "Sarasa Gothic SC"
-              "Sarasa Gothic CL"
+              "Sarasa Gothic"
+              "Source Han Serif"
+              "Noto Serif"
             ];
           };
+
+          localConf = ''
+            <?xml version='1.0'?>
+            <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
+            <fontconfig>
+              <alias binding="same">
+                <family>Helvetica</family>
+                <prefer>
+                  <family>sans-serif</family>
+                </prefer>
+              </alias>
+              <alias binding="same">
+                <family>Arial</family>
+                <prefer>
+                  <family>sans-serif</family>
+                </prefer>
+              </alias>
+            </fontconfig>
+          '';
         };
       };
     })
diff --git a/modules/nixos/monitoring/default.nix b/modules/nixos/monitoring/default.nix
index 7f62874..57adf1c 100644
--- a/modules/nixos/monitoring/default.nix
+++ b/modules/nixos/monitoring/default.nix
@@ -194,6 +194,11 @@ in {
               hosts = [manwe];
               inherit (config.services.prometheus.exporters.wireguard) port;
             };
+            # TODO Wait for https://github.com/NixOS/nixpkgs/pull/265696
+            exportarr-lidarr = {
+              hosts = [yavanna];
+              port = 9708;
+            };
           };
 
         ruleFiles = [
diff --git a/modules/nixos/mpv.nix b/modules/nixos/mpv.nix
new file mode 100644
index 0000000..efe1729
--- /dev/null
+++ b/modules/nixos/mpv.nix
@@ -0,0 +1,89 @@
+{
+  config,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.mpv;
+in {
+  config = mkIf cfg.enable {
+    nixfiles.modules.common.xdg.defaultApplications.mpv = let
+      audio = [
+        "audio/aac"
+        "audio/ac3"
+        "audio/basic"
+        "audio/flac"
+        "audio/midi"
+        "audio/mp4"
+        "audio/mpeg"
+        "audio/ogg"
+        "audio/opus"
+        "audio/vnd.dts"
+        "audio/vnd.dts.hd"
+        "audio/webm"
+        "audio/x-adpcm"
+        "audio/x-aifc"
+        "audio/x-aiff"
+        "audio/x-ape"
+        "audio/x-flac+ogg"
+        "audio/x-m4b"
+        "audio/x-m4r"
+        "audio/x-matroska"
+        "audio/x-mpegurl"
+        "audio/x-musepack"
+        "audio/x-opus+ogg"
+        "audio/x-speex"
+        "audio/x-speex+ogg"
+        "audio/x-vorbis+ogg"
+        "audio/x-wav"
+        "audio/x-wavpack"
+        "x-content/audio-cdda"
+        "x-content/audio-dvd"
+      ];
+      video = [
+        "video/3gpp"
+        "video/3gpp2"
+        "video/mkv"
+        "video/mp2t"
+        "video/mp4"
+        "video/mpeg"
+        "video/ogg"
+        "video/quicktime"
+        "video/vnd.mpegurl"
+        "video/vnd.radgamettools.bink"
+        "video/vnd.radgamettools.smacker"
+        "video/wavelet"
+        "video/webm"
+        "video/x-matroska"
+        "video/x-matroska-3d"
+        "video/x-mjpeg"
+        "video/x-msvideo"
+        "video/x-ogm+ogg"
+        "video/x-theora+ogg"
+        "x-content/video-bluray"
+        "x-content/video-dvd"
+        "x-content/video-hddvd"
+        "x-content/video-svcd"
+        "x-content/video-vcd"
+      ];
+      image = [
+        "image/avif"
+        "image/bmp"
+        "image/gif"
+        "image/jp2"
+        "image/jpeg"
+        "image/jpg"
+        "image/jpm"
+        "image/jpx"
+        "image/jxl"
+        "image/png"
+        "image/tiff"
+        "image/vnd.microsoft.icon"
+        "image/webp"
+        "image/webp"
+        "image/x-tga"
+      ];
+    in
+      audio ++ video ++ image;
+  };
+}
diff --git a/modules/nixos/zathura.nix b/modules/nixos/zathura.nix
new file mode 100644
index 0000000..e7d1415
--- /dev/null
+++ b/modules/nixos/zathura.nix
@@ -0,0 +1,15 @@
+{
+  config,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.zathura;
+in {
+  config = mkIf cfg.enable {
+    nixfiles.modules.common.xdg.defaultApplications."org.pwmt.zathura" = [
+      "application/pdf"
+      "application/epub+zip"
+    ];
+  };
+}

Consider giving Nix/NixOS a try! <3