From 7e98fc2e524603f7a3778d1ed3fe069b16ea3dba Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Fri, 24 Oct 2025 08:18:46 +0530 Subject: [PATCH] feat(darwin): add stylix module for enhanced styling options --- darwin/default.nix | 1 + flake.lock | 300 +++++++++++++++++++++++++++++++++++++++- flake.nix | 4 + home/apps/mpv.nix | 29 ++-- home/programs/yazi.nix | 12 +- nixos/default.nix | 1 + nixos/tsuba/default.nix | 1 + themes/catppuccin.nix | 4 +- 8 files changed, 336 insertions(+), 16 deletions(-) diff --git a/darwin/default.nix b/darwin/default.nix index 93c90fb5..c08c9717 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -16,6 +16,7 @@ {nixpkgs.overlays = overlays;} ./${device.name}/configuration.nix inputs.sops-nix.darwinModules.sops + inputs.stylix.darwinModules.stylix home-manager.darwinModules.home-manager { nixpkgs.config.allowUnfree = true; diff --git a/flake.lock b/flake.lock index b1cd1358..0aac824b 100644 --- a/flake.lock +++ b/flake.lock @@ -284,6 +284,74 @@ "type": "github" } }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, "command-runner": { "inputs": { "advisory-db": "advisory-db_2", @@ -624,6 +692,22 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1758112371, + "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -890,6 +974,27 @@ "type": "github" } }, + "flake-parts_7": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4524271976b625a4a605beefd893f270620fd751", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -1012,7 +1117,7 @@ }, "flake-utils_16": { "inputs": { - "systems": "systems_19" + "systems": "systems_20" }, "locked": { "lastModified": 1731533236, @@ -1030,7 +1135,7 @@ }, "flake-utils_17": { "inputs": { - "systems": "systems_20" + "systems": "systems_21" }, "locked": { "lastModified": 1726560853, @@ -1048,7 +1153,7 @@ }, "flake-utils_18": { "inputs": { - "systems": "systems_21" + "systems": "systems_22" }, "locked": { "lastModified": 1731533236, @@ -1208,6 +1313,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "ghostty": { "inputs": { "flake-compat": "flake-compat_2", @@ -1274,6 +1395,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "48.2", + "repo": "gnome-shell", + "type": "github" + } + }, "guihua": { "flake": false, "locked": { @@ -2605,6 +2743,31 @@ "type": "github" } }, + "nur_2": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758998580, + "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils_11", @@ -2792,6 +2955,7 @@ "rest-nvim": "rest-nvim", "rust-overlay": "rust-overlay_8", "sops-nix": "sops-nix", + "stylix": "stylix", "tmux-float": "tmux-float", "tree-sitter-d2": "tree-sitter-d2", "tree-sitter-just": "tree-sitter-just", @@ -3073,6 +3237,40 @@ "type": "github" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_7", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur_2", + "systems": "systems_19", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1761028816, + "narHash": "sha256-s1XiIeJHpODVWfzsPaK9e21iz1dQSCU3H4/1OxOsyps=", + "owner": "nix-community", + "repo": "stylix", + "rev": "b81dc0a385443099e7d231fe6275189e32c3b760", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1689347949, @@ -3283,6 +3481,21 @@ "type": "github" } }, + "systems_22": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_3": { "locked": { "lastModified": 1681028828, @@ -3388,6 +3601,87 @@ "type": "github" } }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1757716333, + "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1757811970, + "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1757811247, + "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, "tmux-float": { "inputs": { "advisory-db": "advisory-db_5", diff --git a/flake.nix b/flake.nix index ce9528e6..0759feb4 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + stylix = { + url = "github:nix-community/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager-stable = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/apps/mpv.nix b/home/apps/mpv.nix index ec431522..53f33660 100644 --- a/home/apps/mpv.nix +++ b/home/apps/mpv.nix @@ -4,17 +4,26 @@ config = { vo = "gpu-next"; gpu-api = "vulkan"; - # hdr-compute-peak = "yes"; - # hdr-peak-detect = "yes"; - # target-peak = 400; - # target-prim = "bt.2020"; - # target-trc = "pq"; - # inverse-tone-mapping = "yes"; - # tone-mapping = "spline"; - # tone-mapping-mode = "auto"; - # target-colorspace-hint = "auto"; - # gamut-mapping = "desaturate"; + loop-file = "inf"; + loop-playlist = "inf"; }; + profiles = { + hdr = { + vo = "gpu-next"; + gpu-api = "vulkan"; + hdr-compute-peak = "yes"; + hdr-peak-detect = "yes"; + target-peak = 400; + target-prim = "bt.2020"; + target-trc = "pq"; + inverse-tone-mapping = "yes"; + tone-mapping = "spline"; + tone-mapping-mode = "auto"; + target-colorspace-hint = "auto"; + gamut-mapping = "desaturate"; + }; + }; + package = if pkgs.stdenv.isLinux then pkgs.mpv-unwrapped.wrapper {mpv = pkgs.mpv-unwrapped.override {sixelSupport = true;};} diff --git a/home/programs/yazi.nix b/home/programs/yazi.nix index 72a56a5c..0368cdc6 100644 --- a/home/programs/yazi.nix +++ b/home/programs/yazi.nix @@ -9,6 +9,16 @@ enable = true; enableFishIntegration = true; enableNushellIntegration = true; - theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha.toml"); + theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha/catppuccin-mocha-mauve.toml"); + settings = lib.mkIf (device.is "ryu") { + plugin = { + prepend_preloaders = [ + { + name = "/run/user/1000/gvfs"; + run = "noop"; + } + ]; + }; + }; }; } diff --git a/nixos/default.nix b/nixos/default.nix index 76994deb..f9dd1ea1 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -19,6 +19,7 @@ nur.modules.nixos.default inputs.sops-nix.nixosModules.sops inputs.disko.nixosModules.disko + inputs.stylix.nixosModules.stylix {nixpkgs.overlays = overlays;} home-manager.nixosModules.home-manager inputs.arion.nixosModules.arion diff --git a/nixos/tsuba/default.nix b/nixos/tsuba/default.nix index c0dfc931..77c954f5 100644 --- a/nixos/tsuba/default.nix +++ b/nixos/tsuba/default.nix @@ -21,6 +21,7 @@ inputs.arion.nixosModules.arion inputs.disko.nixosModules.disko inputs.sops-nix.nixosModules.sops + inputs.stylix.nixosModules.stylix inputs.nix-minecraft.nixosModules.minecraft-servers nur.modules.nixos.default home-manager-stable.nixosModules.home-manager diff --git a/themes/catppuccin.nix b/themes/catppuccin.nix index 0113d828..aa527c7e 100644 --- a/themes/catppuccin.nix +++ b/themes/catppuccin.nix @@ -68,8 +68,8 @@ in { # https://github.com/catppuccin/yazi yazi = mkCatppuccin { item = "yazi"; - rev = "0846aed69b2a62d29c98e100af0cf55ca729723d"; - sha256 = "sha256-2T41qWMe++3Qxl9veRNHMeRI3eU4+LAueKTss02gYNk"; + rev = "043ffae14e7f7fcc136636d5f2c617b5bc2f5e31"; + sha256 = "sha256-zkL46h1+U9ThD4xXkv1uuddrlQviEQD3wNZFRgv7M8Y="; }; gtk = pkgs.catppuccin-gtk.override {