diff --git a/flake.lock b/flake.lock index 18a6596..cdab942 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,89 @@ { "nodes": { + "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": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1760703920, + "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "d646af9b7d14bff08824538164af99d0c521b185", + "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" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1764724327, + "narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -42,6 +126,62 @@ "type": "github" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "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" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "host": "gitlab.gnome.org", + "lastModified": 1764524476, + "narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22", + "type": "gitlab" + }, + "original": { + "host": "gitlab.gnome.org", + "owner": "GNOME", + "ref": "gnome-49", + "repo": "gnome-shell", + "type": "gitlab" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -95,6 +235,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1766651565, + "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": "flake-parts", @@ -137,13 +293,167 @@ "type": "github" } }, + "nur_2": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764773531, + "narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=", + "owner": "nix-community", + "repo": "NUR", + "rev": "1d9616689e98beded059ad0384b9951e967a17fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", - "nur-unstable": "nur-unstable" + "nur-unstable": "nur-unstable", + "stylix": "stylix" + } + }, + "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_3", + "gnome-shell": "gnome-shell", + "nixpkgs": "nixpkgs_2", + "nur": "nur_2", + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1767652667, + "narHash": "sha256-zsgfockkvK0JrSvzVAb8JeUq3SDdITu6ViUf7yeIpi4=", + "owner": "danth", + "repo": "stylix", + "rev": "a4406d9799d002c41296c72378a1094a8fc9aa1b", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "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": 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": 1763914658, + "narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1764465359, + "narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "edf89a780e239263cc691a987721f786ddc4f6aa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1764464512, + "narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 330b38a..c060c1d 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + stylix.url = "github:danth/stylix"; nur = { url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; @@ -18,7 +19,7 @@ }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nur, nur-unstable, home-manager, ... }: + outputs = { self, nixpkgs, nixpkgs-unstable, nur, nur-unstable, home-manager, stylix, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -38,6 +39,7 @@ }; sharedModules = [ ./hosts/common/base.nix + stylix.nixosModules.stylix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.useGlobalPkgs = true; @@ -57,9 +59,10 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/common/workstation.nix ./hosts/electra/configuration.nix + ./hosts/common/workstation.nix ./hosts/common/wm/sway.nix + ./hosts/common/stylix.nix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.users.alisceon.imports = [ @@ -75,9 +78,10 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/common/workstation.nix ./hosts/tower/configuration.nix + ./hosts/common/workstation.nix ./hosts/common/wm/sway.nix + ./hosts/common/stylix.nix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.users.alisceon.imports = [ diff --git a/home/wm/sway.nix b/home/wm/sway.nix index f41f145..e6ea74c 100644 --- a/home/wm/sway.nix +++ b/home/wm/sway.nix @@ -6,7 +6,7 @@ term = "${pkgs.kitty}/bin/kitty"; dmenu = "${pkgs.rofi}/bin/rofi -show drun"; notify = "${pkgs.libnotify}/bin/notify-send"; - nag = "${pkgs.sway}/bin/swaynag --edge bottom --font '${style_font} ${style_font_sz}'"; + nag = "${pkgs.sway}/bin/swaynag --edge bottom"; # keybinds key_mod = "Mod4"; @@ -16,64 +16,6 @@ key_up = "Up"; key_down = "Down"; - # style - style_font = "Inconsolata"; - style_font_sz = "12"; - style_font_bold = "${style_font}-Bold"; - color_blue_1 = "#99c1f1"; - color_blue_2 = "#62a0ea"; - color_blue_3 = "#3584e4"; - color_blue_4 = "#1c71d8"; - color_blue_5 = "#1a5fb4"; - color_green_1 = "#8ff0a4"; - color_green_2 = "#57e389"; - color_green_3 = "#33d17a"; - color_green_4 = "#2ec27e"; - color_green_5 = "#26a269"; - color_yellow_1 = "#f9f06b"; - color_yellow_2 = "#f8e45c"; - color_yellow_3 = "#f6d32d"; - color_yellow_4 = "#f5c211"; - color_yellow_5 = "#e5a50a"; - color_orange_1 = "#ffbe6f"; - color_orange_2 = "#ffa348"; - color_orange_3 = "#ff7800"; - color_orange_4 = "#e66100"; - color_orange_5 = "#c64600"; - color_red_1 = "#f66151"; - color_red_2 = "#ed333b"; - color_red_3 = "#e01b24"; - color_red_4 = "#c01c28"; - color_red_5 = "#a51d2d"; - color_purple_1 = "#dc8add"; - color_purple_2 = "#c061cb"; - color_purple_3 = "#9141ac"; - color_purple_4 = "#813d9c"; - color_purple_5 = "#613583"; - color_brown_1 = "#cdab8f"; - color_brown_2 = "#b5835a"; - color_brown_3 = "#986a44"; - color_brown_4 = "#865e3c"; - color_brown_5 = "#63452c"; - color_light_1 = "#ffffff"; - color_light_2 = "#f6f5f4"; - color_light_3 = "#d8d8d8"; - color_light_4 = "#c0c0c0"; - color_light_5 = "#9b9b9b"; - color_dark_1 = "#757575"; - color_dark_2 = "#666666"; - color_dark_3 = "#494949"; - color_dark_4 = "#333333"; - color_dark_5 = "#000000"; - color_f_bg = color_dark_3; - color_f_text = color_light_1; - color_uf_bg = color_dark_4; - color_uf_text = color_light_4; - color_alert_bg = color_red_5; - color_alert_text = color_light_1; - color_inv_bg = color_light_4; - color_inv_text = color_dark_5; - # other display = status: "${swaymsg} 'output * power ${status}'"; hostnameOutput = @@ -173,10 +115,6 @@ bars = [ { command = "${pkgs.waybar}/bin/waybar"; } ]; - fonts = { - names = ["${style_font}"]; - size = style_font_sz; - }; input = { "type:touchpad" = { dwt = "enabled"; @@ -286,45 +224,7 @@ commands = [ { criteria = { all = true; }; command = "inhibit_idle fullscreen"; } ]; - }; - colors = { - background = color_dark_5; - focused = { - border = color_f_bg; - background = color_f_bg; - text = color_light_1; - indicator = color_f_bg; - childBorder = color_f_bg; - }; - focusedInactive = { - border = color_f_bg; - background = color_f_bg; - text = color_light_1; - indicator = color_f_bg; - childBorder = color_f_bg; - }; - unfocused = { - border = color_uf_bg; - background = color_uf_bg; - text = color_uf_text; - indicator = color_uf_bg; - childBorder = color_uf_bg; - }; - urgent = { - border = color_alert_bg; - background = color_alert_bg; - text = color_alert_text; - indicator = color_alert_bg; - childBorder = color_alert_bg; - }; - placeholder = { - border = color_dark_3; - background = color_dark_3; - text = color_light_4; - indicator = color_dark_3; - childBorder = color_dark_3; - }; - }; # end colors + }; # end window assigns = { "1" = [{app_id = "firefox";}]; "2" = [{class = "steam";}]; @@ -346,11 +246,8 @@ settings = { actions = true; anchor = "top-center"; - background-color = color_f_bg; - border-color = color_f_bg; border-radius = 0; default-timeout = 10000; - font = "${style_font} ${style_font_sz}"; height = 100; width = 600; icons = true; @@ -372,78 +269,6 @@ programs = { rofi = { enable = true; - font = "${style_font} ${style_font_sz}"; - theme = let - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - bg = mkLiteral color_uf_bg; - fg = mkLiteral color_f_text; - ac = mkLiteral color_f_bg; - background-color = mkLiteral "transparent"; - }; - - "#window" = { - background-color = mkLiteral "@bg"; - location = mkLiteral "center"; - width = mkLiteral "30%"; - }; - - "#prompt" = { - text-color = mkLiteral "@fg"; - }; - - "#textbox-prompt-colon" = { - text-color = mkLiteral "@fg"; - }; - - "#entry" = { - text-color = mkLiteral "@fg"; - blink = mkLiteral "true"; - }; - - "#inputbar" = { - children = mkLiteral "[ prompt, entry ]"; - text-color = mkLiteral "@fg"; - padding = mkLiteral "5px"; - }; - - "#listview" = { - columns = mkLiteral "1"; - lines = mkLiteral "6"; - cycle = mkLiteral "true"; - dynamic = mkLiteral "true"; - }; - - "#mainbox" = { - border = mkLiteral "3px"; - border-color = mkLiteral "@ac"; - children = mkLiteral "[ inputbar, listview ]"; - padding = mkLiteral "10px"; - }; - - "#element" = { - text-color = mkLiteral "@fg"; - padding = mkLiteral "5px"; - }; - - "#element-icon" = { - text-color = mkLiteral "@fg"; - size = mkLiteral "32px"; - }; - - "#element-text" = { - text-color = mkLiteral "@fg"; - padding = mkLiteral "5px"; - }; - - "#element selected" = { - border = mkLiteral "3px"; - border-color = mkLiteral "@ac"; - text-color = mkLiteral "@fg"; - background-color = mkLiteral "@ac"; - }; - }; # end theme }; # end rofi waybar = { enable = true; @@ -521,177 +346,20 @@ }; }; # end mainbar }; # end settings - style = '' - * { - font-family: ${style_font_bold}; - font-size: ${style_font_sz}pt; - } - - window#waybar { - color: ${color_f_text}; - background-color: ${color_uf_bg}; - transition-property: background-color; - transition-duration: .5s; - } - - window#waybar.hidden { - opacity: 0.2; - } - - /* - window#waybar.empty { - background-color: transparent; - } - window#waybar.solo { - background-color: ${color_purple_1}; - } - */ - - button { - box-shadow: inset 0 -8px transparent; - border: none; - border-radius: 0; - } - - button:hover { - color: ${color_f_text}; - background: ${color_f_bg}; - } - - #workspaces button { - color: ${color_uf_text}; - background-color: ${color_uf_bg}; - } - - #workspaces button:hover { - color: ${color_f_text}; - background: ${color_f_bg}; - } - - #workspaces button.focused { - color: ${color_inv_text}; - background-color: ${color_inv_bg}; - } - - #workspaces button.urgent { - color: ${color_alert_text}; - background-color: ${color_alert_bg}; - } - - #battery, - #clock, - #network, - #pulseaudio, - #tray, - - #window, - #workspaces { - margin: 0 2px; - } - - .modules-left > widget:first-child > #workspaces { - margin-left: 0; - } - - .modules-right > widget:last-child > #workspaces { - margin-right: 0; - } - - #battery { - color: ${color_f_text}; - background-color: transparent; - } - - #battery.critical.discharging { - animation: blink 1s infinite; - color: ${color_red_2}; - } - - #battery.warning.discharging { - animation: blink 1s infinite; - color: ${color_orange_2}; - } - - #battery.good { - animation: none; - color: ${color_f_text}; - } - - #battery.full.charging { - color: ${color_green_2}; - } - - #battery.over.charging { - color: ${color_green_2}; - } - - #clock { - color: ${color_f_text}; - background-color: transparent; - } - - label:focus { - color: ${color_f_text}; - background-color: transparent; - } - - #network { - color: ${color_f_text}; - background-color: transparent; - } - - #network.disconnected { - color: ${color_f_text}; - background-color: transparent; - } - - #pulseaudio { - color: ${color_f_text}; - background-color: transparent; - } - - #pulseaudio.muted { - color: ${color_f_text}; - background-color: transparent; - } - #tray { - background-color: transparent; - } - - #tray > .passive { - -gtk-icon-effect: dim; - } - - #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: transparent; - } - ''; # end style }; # end waybar swaylock = { enable = true; settings = { - color = color_uf_bg; - font = style_font; - font-size = style_font_sz; ignore-empty-password = true; indicator-caps-lock = true; - indicator-radius = 50; - indicator-thickness = 10; }; # end settings }; # end swaylock kitty = { enable = true; - font = { - name = style_font; - size = lib.toInt style_font_sz; - }; settings = { confirm_os_window_close = 0; enable_audio_bell = false; window_padding_width = 2; - foreground = color_f_text; - background = color_uf_bg; }; }; # end kitty }; # end programs @@ -700,14 +368,6 @@ gtk2.enable = true; gtk3.enable = true; gtk4.enable = true; - colorScheme = "dark"; - theme.name = "Adwaita-Dark"; - cursorTheme.name = "Adwaita-Dark"; - font.package = pkgs.inconsolata; - font.name = "Inconsolata"; - font.size = 14; - iconTheme.name = "Adwaita-Dark"; - iconTheme.package = pkgs.adwaita-icon-theme; }; xdg.configFile."libinput-gestures.conf".text = '' @@ -759,7 +419,6 @@ "application/x-web-app-manifest+json" = [ "${pkgs.firefox}/share/applications/firefox.desktop" ]; "application/xml-dtd" = [ "${pkgs.firefox}/share/applications/firefox.desktop" ]; - # Images "image/png" = [ "${pkgs.swayimg}/share/applications/swayimg.desktop" ]; "image/jpeg" = [ "${pkgs.swayimg}/share/applications/swayimg.desktop" ]; diff --git a/hosts/common/stylix.nix b/hosts/common/stylix.nix new file mode 100644 index 0000000..221359f --- /dev/null +++ b/hosts/common/stylix.nix @@ -0,0 +1,72 @@ +{ config, pkgs, lib, ... }: + +let + # Opinionated: Nord Base16 scheme (YAML). Swap this for Catppuccin, Gruvbox, etc. + nordYaml = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/tinted-theming/base16-schemes/master/nord.yaml"; + sha256 = lib.fakeSha256; # replace with real hash after first build + }; +in +{ + stylix = { + enable = true; + + # Wallpaper applied broadly (Sway, etc.) + image = pkgs.fetchurl { + url = "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=2400&q=80"; + sha256 = lib.fakeSha256; # replace with real hash after first build + }; + + base16Scheme = nordYaml; + + # Choose light/dark behavior + polarity = "dark"; + + fonts = { + monospace = { + package = pkgs.jetbrains-mono; + name = "JetBrains Mono"; + }; + sansSerif = { + package = pkgs.inter; + name = "Inter"; + }; + serif = { + package = pkgs.source-serif; + name = "Source Serif 4"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + + sizes = { + applications = 11; + terminal = 12; + desktop = 11; + popups = 11; + }; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + + # Optional: global opacity hints some targets use + opacity = { + applications = 0.95; + terminal = 0.92; + popups = 0.95; + }; + + # Tell Stylix to actually theme these: + targets.sway.enable = true; + targets.waybar.enable = true; + + # Usually nice to have: + targets.gtk.enable = true; + targets.kitty.enable = true; # if you use kitty + }; +}