diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 66bf3e5..72a0f85 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -96,8 +96,12 @@ jobs:
 
       - uses: DeterminateSystems/magic-nix-cache-action@v2
 
+      - name: Check formatting
+        run: nix fmt -- -c .
+
       - name: Build yandex-music
         run: nix build --impure .#yandex-music
+
       - name: Build yandex-music without flakes binaries
         run: nix build --impure .#yandex-music-noflakes
 
diff --git a/flake.lock b/flake.lock
index cbf54b2..bb6015c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
         "systems": "systems"
       },
       "locked": {
-        "lastModified": 1705309234,
-        "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
         "type": "github"
       },
       "original": {
@@ -19,16 +19,18 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1708093448,
-        "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
-        "owner": "NixOS",
+        "lastModified": 1741379970,
+        "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
+        "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f",
+        "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
         "type": "github"
       },
       "original": {
-        "id": "nixpkgs",
-        "type": "indirect"
+        "owner": "nixos",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
       }
     },
     "root": {
diff --git a/flake.nix b/flake.nix
index 6c66caf..7c3b33a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,13 +4,23 @@
   inputs = {
     ymExe.url = "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.41.1.exe";
     ymExe.flake = false;
+
+    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
   };
 
-  outputs = { self, ymExe, nixpkgs, flake-utils }:
+  outputs =
+    {
+      self,
+      ymExe,
+      nixpkgs,
+      flake-utils,
+    }:
     let
-      yandex-music-with = pkgs: pkgs.callPackage ./nix {
-        inherit ymExe;
-      };
+      yandex-music-with =
+        pkgs:
+        pkgs.callPackage ./nix {
+          inherit ymExe;
+        };
       modules = isHm: rec {
         yandex-music = {
           imports = [ (import ./nix/module.nix { inherit isHm yandex-music-with; }) ];
@@ -18,19 +28,21 @@
         default = yandex-music;
       };
     in
-    flake-utils.lib.eachDefaultSystem
-      (system:
-        let
-          pkgs = import nixpkgs { inherit system; };
-        in
-        {
-          packages = rec {
-            yandex-music = yandex-music-with pkgs;
-            yandex-music-noflakes = pkgs.callPackage ./nix { };
-            default = yandex-music;
-          };
-        }
-      ) // {
+    flake-utils.lib.eachDefaultSystem (
+      system:
+      let
+        pkgs = import nixpkgs { inherit system; };
+      in
+      {
+        packages = rec {
+          yandex-music = yandex-music-with pkgs;
+          yandex-music-noflakes = pkgs.callPackage ./nix { };
+          default = yandex-music;
+        };
+        formatter = pkgs.nixfmt-rfc-style;
+      }
+    )
+    // {
       nixosModules = modules false;
       homeManagerModules = modules true;
 
diff --git a/nix/default.nix b/nix/default.nix
index 193dbae..c80ce83 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -1,22 +1,23 @@
-{ fetchurl
-, stdenvNoCC
-, lib
-, makeWrapper
+{
+  fetchurl,
+  stdenvNoCC,
+  lib,
+  makeWrapper,
 
-, p7zip
-, asar
-, jq
-, python3
-, electron
+  p7zip,
+  asar,
+  jq,
+  python3,
+  electron,
 
-, ymExe ? null
-, electronArguments ? ""
-, trayEnabled ? false
-, trayStyle ? 1
-, trayAlways ? false
-, devTools ? false
-, vibeAnimationMaxFps ? 25
-, customTitleBar ? false
+  ymExe ? null,
+  electronArguments ? "",
+  trayEnabled ? false,
+  trayStyle ? 1,
+  trayAlways ? false,
+  devTools ? false,
+  vibeAnimationMaxFps ? 25,
+  customTitleBar ? false,
 }:
 let
   inherit (lib) optionalString assertMsg;
@@ -24,8 +25,7 @@ let
 in
 assert assertMsg (trayStyle >= 1 && trayStyle <= 3) "Tray style must be withing 1 and 3";
 assert assertMsg (vibeAnimationMaxFps >= 0) "Vibe animation max FPS must be greater then 0";
-stdenvNoCC.mkDerivation
-{
+stdenvNoCC.mkDerivation {
   name = "yandex-music";
   inherit (version_info.ym) version;
 
@@ -44,8 +44,8 @@ stdenvNoCC.mkDerivation
   desktopItem = ../templates/desktop;
   ymScript = ../templates/yandex-music.sh;
   src =
-    if ymExe != null
-    then ymExe
+    if ymExe != null then
+      ymExe
     else
       fetchurl {
         url = version_info.ym.exe_link;
@@ -61,18 +61,23 @@ stdenvNoCC.mkDerivation
   '';
   dontPatch = true;
 
-  config =''
-    ELECTRON_ARGS="${electronArguments}"
-    VIBE_ANIMATION_MAX_FPS=${toString vibeAnimationMaxFps}
-  '' + optionalString trayEnabled ''
-    TRAY_ENABLED=${toString trayStyle}
-  '' + optionalString trayAlways ''
-    ALWAYS_LEAVE_TO_TRAY=1
-  '' + optionalString devTools ''
-    DEV_TOOLS=1
-  '' + optionalString customTitleBar ''
-    CUSTOM_TITLE_BAR=1
-  '';
+  config =
+    ''
+      ELECTRON_ARGS="${electronArguments}"
+      VIBE_ANIMATION_MAX_FPS=${toString vibeAnimationMaxFps}
+    ''
+    + optionalString trayEnabled ''
+      TRAY_ENABLED=${toString trayStyle}
+    ''
+    + optionalString trayAlways ''
+      ALWAYS_LEAVE_TO_TRAY=1
+    ''
+    + optionalString devTools ''
+      DEV_TOOLS=1
+    ''
+    + optionalString customTitleBar ''
+      CUSTOM_TITLE_BAR=1
+    '';
 
   installPhase = ''
     mkdir -p "$out/share/nodejs"
@@ -101,7 +106,10 @@ stdenvNoCC.mkDerivation
     homepage = "https://music.yandex.ru/";
     downloadPage = "https://music.yandex.ru/download/";
     license = lib.licenses.unfree;
-    platforms = [ "x86_64-linux" "aarch64-linux" ];
+    platforms = [
+      "x86_64-linux"
+      "aarch64-linux"
+    ];
     maintainers = [
       {
         name = "Yury Shvedov";
diff --git a/nix/module.nix b/nix/module.nix
index 76f3e76..5c3ccc7 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -1,19 +1,27 @@
-{ yandex-music-with
-, isHm ? false
+{
+  yandex-music-with,
+  isHm ? false,
+}:
+{
+  lib,
+  pkgs,
+  config,
+  ...
 }:
-{ lib, pkgs, config, ... }:
 let
   cfg = config.programs.yandex-music;
 
 in
 {
-  imports = [{
-    nixpkgs.overlays = [
-      (final: prev: {
-        yandex-music = yandex-music-with prev;
-      })
-    ];
-  }];
+  imports = [
+    {
+      nixpkgs.overlays = [
+        (final: prev: {
+          yandex-music = yandex-music-with prev;
+        })
+      ];
+    }
+  ];
 
   options = {
     programs.yandex-music = {