From afd74b56eaccda72c01db48f8ddabd2d2042460b Mon Sep 17 00:00:00 2001 From: joy Date: Sun, 24 Nov 2024 16:19:57 +0100 Subject: [PATCH] update --- flake.lock | 12 +++--- modules/programs/helix/default.nix | 8 +--- modules/wm/default.nix | 2 +- modules/wm/home/default.nix | 1 + modules/wm/home/dunst/default.nix | 14 +++---- modules/wm/home/stylix/default.nix | 67 ++++++++++++++++++++++++++++++ modules/wm/stylix/default.nix | 43 +++++++++---------- 7 files changed, 104 insertions(+), 43 deletions(-) create mode 100644 modules/wm/home/stylix/default.nix diff --git a/flake.lock b/flake.lock index 7109483..8aa95d4 100644 --- a/flake.lock +++ b/flake.lock @@ -97,11 +97,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1732248209, - "narHash": "sha256-Mv8k0VuGdb6YhhKt+8SIvhMdmI4xZhw/3ycSvlAq19Q=", + "lastModified": 1732453878, + "narHash": "sha256-Sx5srP6yytPH1Aw7SfARM7jblIBLoEl4U8hZUN6M4Fk=", "owner": "rycee", "repo": "nur-expressions", - "rev": "4a8ba00d1be3f3745428ed56efbb32155c548192", + "rev": "2086e1e4b9ada90a0ac3121c97a3e20f3b92bd37", "type": "gitlab" }, "original": { @@ -203,11 +203,11 @@ ] }, "locked": { - "lastModified": 1732303962, - "narHash": "sha256-5Umjb5AdtxV5jSJd5jxoCckh5mlg+FBQDsyAilu637g=", + "lastModified": 1732453510, + "narHash": "sha256-mAOaLu++YRwOxCJ135Bhgf78WYhIKWHL2aGWCAoXoBg=", "owner": "nix-community", "repo": "home-manager", - "rev": "8cf9cb2ee78aa129e5b8220135a511a2be254c0c", + "rev": "bd58a1132e9b7f121f65313bc662ad6c8a05f878", "type": "github" }, "original": { diff --git a/modules/programs/helix/default.nix b/modules/programs/helix/default.nix index 9ff46b2..f61e043 100644 --- a/modules/programs/helix/default.nix +++ b/modules/programs/helix/default.nix @@ -1,13 +1,9 @@ -{ - pkgs, - lib, - ... -}: { +{pkgs, ...}: { programs.helix = { enable = true; defaultEditor = true; settings = { - theme = lib.mkForce "gruvbox"; + theme = "gruvbox"; editor = { line-number = "relative"; shell = ["zsh" "-c"]; diff --git a/modules/wm/default.nix b/modules/wm/default.nix index 0cdf93d..896dc35 100644 --- a/modules/wm/default.nix +++ b/modules/wm/default.nix @@ -9,7 +9,7 @@ ./gnome ./hyprland ./polkit - ./stylix + # ./stylix ./syncthing ]; home-manager = { diff --git a/modules/wm/home/default.nix b/modules/wm/home/default.nix index c9811cc..6783ddc 100644 --- a/modules/wm/home/default.nix +++ b/modules/wm/home/default.nix @@ -11,5 +11,6 @@ ./misc ./qt ./gtk + ./stylix ]; } diff --git a/modules/wm/home/dunst/default.nix b/modules/wm/home/dunst/default.nix index 12750e0..7fd5ad6 100644 --- a/modules/wm/home/dunst/default.nix +++ b/modules/wm/home/dunst/default.nix @@ -1,17 +1,17 @@ -{lib, ...}: { +{ services.dunst = { enable = true; settings = { global = { - background = lib.mkForce "#282828"; - foreground = lib.mkForce "#D5C4A1"; + background = "#282828"; + foreground = "#D5C4A1"; geometry = "300x60-3+200"; padding = 8; horizontal_padding = 8; separator_height = 2; frame_width = 4; corner_radius = 5; - font = lib.mkForce "DejaVuSansMono 12"; + font = "DejaVuSansMono 12"; alignment = "center"; vertical_alignment = "center"; ellipsize = "middle"; @@ -19,15 +19,15 @@ }; urgency_low = { - frame_color = lib.mkForce "#98971a"; + frame_color = "#98971a"; }; urgency_normal = { - frame_color = lib.mkForce "#458588"; + frame_color = "#458588"; }; urgency_critical = { - frame_color = lib.mkForce "#98971a"; + frame_color = "#98971a"; }; }; }; diff --git a/modules/wm/home/stylix/default.nix b/modules/wm/home/stylix/default.nix new file mode 100644 index 0000000..68dcb0b --- /dev/null +++ b/modules/wm/home/stylix/default.nix @@ -0,0 +1,67 @@ +{ + pkgs, + inputs, + username, + lib, + ... +}: let + backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; + backgroundSha256 = "sha256-10Lv25V0RG0mnw/O90DeVchCNWJbdktUADtuI+enEwM="; +in { + imports = [inputs.stylix.homeManagerModules.stylix]; + + stylix = { + enable = true; + polarity = "dark"; + targets = { + foot.enable = false; + rofi.enable = false; + dunst.enable = false; + helix.enable = false; + # gnome.enable = lib.mkForce false; + }; + + base16Scheme = { + base00 = "282828"; # ---- + base01 = "3c3836"; # --- + base02 = "504945"; # -- + base03 = "665c54"; # - + base04 = "bdae93"; # + + base05 = "d5c4a1"; # ++ + base06 = "ebdbb2"; # +++ + base07 = "fbf1c7"; # ++++ + base08 = "cc241d"; # red + base09 = "fe0819"; # orange + base0A = "d79921"; # yellow + base0B = "98971a"; # green + base0C = "689d6a"; # aqua/cyan + base0D = "458588"; # blue + base0E = "b16286"; # purple + base0F = "a89984"; # brown + }; + + image = pkgs.fetchurl { + url = backgroundUrl; + sha256 = backgroundSha256; + }; + + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 24; + }; + + fonts = { + monospace = { + package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];}; + name = "RobotoMono Nerd Font"; + }; + sizes = { + applications = 12; + terminal = 13; + desktop = 12; + popups = 12; + }; + }; + }; +} diff --git a/modules/wm/stylix/default.nix b/modules/wm/stylix/default.nix index 21064d7..54f16b9 100644 --- a/modules/wm/stylix/default.nix +++ b/modules/wm/stylix/default.nix @@ -7,11 +7,12 @@ backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; backgroundSha256 = "sha256-10Lv25V0RG0mnw/O90DeVchCNWJbdktUADtuI+enEwM="; in { - imports = [inputs.stylix.nixosModules.stylix]; + imports = [inputs.stylix.homeManagerModules.stylix]; stylix = { enable = true; - polarity = "dark"; + autoEnable = false; + # polarity = "dark"; base16Scheme = { base00 = "282828"; # ---- @@ -37,27 +38,23 @@ in { sha256 = backgroundSha256; }; - cursor = { - name = "Bibata-Modern-Ice"; - package = pkgs.bibata-cursors; - size = 24; - }; + # cursor = { + # name = "Bibata-Modern-Ice"; + # package = pkgs.bibata-cursors; + # size = 24; + # }; - fonts = { - monospace = { - package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];}; - name = "RobotoMono Nerd Font"; - }; - sizes = { - applications = 12; - terminal = 13; - desktop = 12; - popups = 12; - }; - }; - }; - home-manager.users.${username}.stylix.targets = { - foot.enable = false; - rofi.enable = false; + # fonts = { + # monospace = { + # package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];}; + # name = "RobotoMono Nerd Font"; + # }; + # sizes = { + # applications = 12; + # terminal = 13; + # desktop = 12; + # popups = 12; + # }; + # }; }; }