From c97591361a8d7eaa4834461af16d89dc8d16a6a1 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Fri, 10 Jan 2025 23:10:34 -0500 Subject: [PATCH] Added stylix --- dot_config/flake/flake.lock | 431 ++++++++++++++++++++++++++-- dot_config/flake/flake.nix | 5 +- dot_config/flake/home/common.nix | 47 ++- dot_config/flake/home/gnome.nix | 2 +- dot_config/flake/home/kitty.nix | 6 +- dot_config/flake/home/stylix.nix | 23 ++ dot_config/flake/home/wash/wash.nix | 2 +- dot_config/helix/config.toml | 39 --- 8 files changed, 476 insertions(+), 79 deletions(-) create mode 100644 dot_config/flake/home/stylix.nix delete mode 100644 dot_config/helix/config.toml diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index 5596c99..a3938d8 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -1,5 +1,71 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1727974419, @@ -15,6 +81,56 @@ "type": "github" } }, + "darwin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1736370755, + "narHash": "sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "57733bd1dc81900e13438e5b4439239f1b29db0e", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1734969791, + "narHash": "sha256-A9PxLienMYJ/WUvqFie9qXrNC2MeRRYw7TG/q7DRjZg=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "92f4890bd150fc9d97b61b3583680c0524a8cafe", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -48,11 +164,118 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "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" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "stylix", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "stylix", + "nixpkgs" + ], + "nixpkgs-stable": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "47.2", + "repo": "gnome-shell", + "type": "github" + } + }, "helix": { "inputs": { "crane": "crane", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay" }, "locked": { @@ -77,11 +300,11 @@ ] }, "locked": { - "lastModified": 1735947440, - "narHash": "sha256-jnEcfmOhWntmVEcqlvs+j532+mvmgsKtQSSfukgkn+A=", + "lastModified": 1736508663, + "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", "owner": "nix-community", "repo": "home-manager", - "rev": "a9987622b7b93c82e147f198574e8e6ffbf5e327", + "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", "type": "github" }, "original": { @@ -90,10 +313,32 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733572789, + "narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, "nixgl": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1713543440, @@ -110,6 +355,36 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1718149104, + "narHash": "sha256-Ds1QpobBX2yoUDx9ZruqVGJ/uQPgcXoYuobBguyKEh8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e913ae340076bbb73d9f4d3d065c2bca7caafb16", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1736344531, + "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1728018373, "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", @@ -125,23 +400,7 @@ "type": "github" } }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1660551188, "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", @@ -156,13 +415,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1733412085, - "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", + "lastModified": 1736200483, + "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", + "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { @@ -172,13 +431,31 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1733550349, + "narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { + "darwin": "darwin", "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", - "nixpkgs": "nixpkgs_3", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs": "nixpkgs_4", + "nixpkgs-unstable": "nixpkgs-unstable", + "stylix": "stylix" } }, "rust-overlay": { @@ -202,6 +479,39 @@ "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-compat": "flake-compat", + "flake-utils": "flake-utils_3", + "git-hooks": "git-hooks", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_5", + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" + }, + "locked": { + "lastModified": 1736381946, + "narHash": "sha256-k66y4eMHZiJO3N43wuZOdoRmGmNwIj3EZq6NGK+AEM8=", + "owner": "danth", + "repo": "stylix", + "rev": "c62df1918d178ade64dc8a2df99e78a5d5f20514", + "type": "github" + }, + "original": { + "owner": "danth", + "ref": "release-24.11", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -216,6 +526,71 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "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": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } } }, "root": "root", diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 8665406..73467cf 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -10,6 +10,7 @@ }; nixgl.url = "github:nix-community/nixGL"; helix.url = "github:helix-editor/helix/25.01"; + stylix.url = "github:danth/stylix/release-24.11"; darwin.url = "github:lnl7/nix-darwin"; }; @@ -20,6 +21,7 @@ home-manager, darwin, helix, + stylix, ... } @ inputs: let inherit (self) outputs; @@ -47,7 +49,6 @@ darwinConfigurations."MAC-C57KK2TC69" = darwin.lib.darwinSystem { specialArgs = {inherit inputs outputs;}; modules = [./home/hinge/darwin.nix]; - }; homeConfigurations = { @@ -60,7 +61,7 @@ "tyler@wash" = home-manager.lib.homeManagerConfiguration { pkgs = allPkgs."x86_64-linux"; extraSpecialArgs = {inherit inputs outputs;}; - modules = [./home/wash/wash.nix]; + modules = [stylix.homeManagerModules.stylix ./home/wash/wash.nix]; }; "tyler@mal" = home-manager.lib.homeManagerConfiguration { diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index 323a16b..eb46d75 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -75,13 +75,54 @@ programs.helix = { enable = true; + settings = { + editor = { + auto-format = false; + #gutters = ["line-numbers", "diagnostics", "diff"] + end-of-line-diagnostics = "warning"; + + inline-diagnostics = { + cursor-line = "error"; + }; + + statusline = { + left = ["mode" "spinner" "spacer" "version-control" "file-name"]; + }; + file-picker = { + # git-ignore = false + }; + + lsp = { + display-inlay-hints = true; + display-messages = true; + }; + + cursor-shape.insert = "bar"; + soft-wrap.enable = true; + }; + + keys = { + normal = { + C-right = "move_next_word_start"; + C-left = "move_prev_word_end"; + a = "insert_mode"; + i = "append_mode"; + "=" = ":format"; + + space = { + F = "file_picker_in_current_buffer_directory"; + }; + }; + insert = { + C-right = "move_next_word_start"; + C-left = "move_prev_word_end"; + }; + }; + }; }; programs.bat = { enable = true; - config = { - theme = "GitHub"; - }; }; programs.zellij = { diff --git a/dot_config/flake/home/gnome.nix b/dot_config/flake/home/gnome.nix index 981580e..2f6172e 100644 --- a/dot_config/flake/home/gnome.nix +++ b/dot_config/flake/home/gnome.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { home.packages = with pkgs; [ - gnome.gnome-tweaks + gnome-tweaks ]; programs.gnome-shell = { diff --git a/dot_config/flake/home/kitty.nix b/dot_config/flake/home/kitty.nix index a26480c..05cb4a8 100644 --- a/dot_config/flake/home/kitty.nix +++ b/dot_config/flake/home/kitty.nix @@ -6,10 +6,6 @@ programs.kitty = { enable = true; package = config.lib.nixGL.wrap pkgs.kitty; - font = { - name = "JetBrainsMono Nerd Font"; - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; - }; settings = { disable_ligatures = "cursor"; @@ -20,7 +16,7 @@ map super+2 goto_tab 2 map super+3 goto_tab 3 map super+4 goto_tab 4 - map super+5 goto_tab 5 + map super+5 goto_tab 5 map super+6 goto_tab 6 map super+7 goto_tab 7 map super+8 goto_tab 8 diff --git a/dot_config/flake/home/stylix.nix b/dot_config/flake/home/stylix.nix new file mode 100644 index 0000000..c8925be --- /dev/null +++ b/dot_config/flake/home/stylix.nix @@ -0,0 +1,23 @@ +{pkgs, ...}: let + theme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; +in { + stylix = { + image = pkgs.fetchurl { + url = "https://www.pixelstalk.net/wp-content/uploads/image11/Get-Glittery-blue-4K-wallpaper-with-a-calm-cool-sparkle.jpg"; + sha256 = "sha256-inZkyQsiF+aqgj2IK2AKN9STYLJBzG+QQCzw/X7cdcw="; + }; + + base16Scheme = theme; + + fonts.monospace = { + name = "JetBrainsMono Nerd Font"; + package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + }; + + enable = true; + + targets.alacritty.enable = false; + # targets.helix.enable = false; + targets.gtk.flatpakSupport.enable = false; + }; +} diff --git a/dot_config/flake/home/wash/wash.nix b/dot_config/flake/home/wash/wash.nix index d23f256..3367f07 100644 --- a/dot_config/flake/home/wash/wash.nix +++ b/dot_config/flake/home/wash/wash.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - imports = [../common.nix ../gnome.nix ../home-backup.nix ../gui.nix]; + imports = [../common.nix ../gnome.nix ../home-backup.nix ../gui.nix ../stylix.nix]; home.packages = with pkgs; [ ventoy diff --git a/dot_config/helix/config.toml b/dot_config/helix/config.toml deleted file mode 100644 index 7f43aef..0000000 --- a/dot_config/helix/config.toml +++ /dev/null @@ -1,39 +0,0 @@ -theme = "catppuccin_macchiato" - -[editor] -auto-format = false -#gutters = ["line-numbers", "diagnostics", "diff"] -end-of-line-diagnostics = "warning" - -[editor.inline-diagnostics] -cursor-line = "error" - -[editor.statusline] -left = ["mode", "spinner", "spacer", "version-control", "file-name"] - -[editor.file-picker] -#git-ignore = false - -[editor.lsp] -display-inlay-hints = true -display-messages = true - -[editor.cursor-shape] -insert = "bar" - -[editor.soft-wrap] -enable = true - -[keys.normal] -C-right = "move_next_word_start" -C-left = "move_prev_word_end" -a = "insert_mode" -i = "append_mode" -"=" = ":format" - -[keys.normal.space] -F = "file_picker_in_current_buffer_directory" - -[keys.insert] -C-right = "move_next_word_start" -C-left = "move_prev_word_end"