From 584b840bba30b95c8bcd7d42d93da9927a5fb55c Mon Sep 17 00:00:00 2001 From: madmin Date: Thu, 18 Jul 2024 20:01:21 +0200 Subject: [PATCH] feat(systems theme): add stylix, nix-colors --- flake.nix | 13 +++++++--- systems/common/optional/stylix.nix | 40 ++++++++++++++++++++++++++++++ systems/jeroboam/default.nix | 19 +++++++++----- 3 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 systems/common/optional/stylix.nix diff --git a/flake.nix b/flake.nix index 6e997d6..830697e 100644 --- a/flake.nix +++ b/flake.nix @@ -65,10 +65,15 @@ # -------------------------- Nix-Colors --------------------------- # # TODO # https://github.com/Misterio77/nix-colors - #nix-colors = { - # url = "github:misterio77/nix-colors"; - # inputs.nixpkgs.follows = "nixpkgs"; - #}; + nix-colors = { + url = "github:misterio77/nix-colors"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # ---------------------------- Stylix ----------------------------- # + stylix = { + url = "github:danth/stylix"; + }; # ====================== Personal Repositories ====================== # # Private secrets repo. See ./docs/secretsmgmt.md diff --git a/systems/common/optional/stylix.nix b/systems/common/optional/stylix.nix new file mode 100644 index 0000000..475599a --- /dev/null +++ b/systems/common/optional/stylix.nix @@ -0,0 +1,40 @@ +{ pkgs, inputs, configLib, ... }: +{ + stylix = { + enable = true; + polarity = "dark"; # TODO: light + image = ( configLib.relativeToRoot "assets/worm.png" ); + base16Scheme = inputs.nix-colors.colorSchemes.atelier-dune; #TODO: atelier-dune-light + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; #TODO: light - Modern-Classic + size = 24; + }; + fonts = { + monospace = { + package = pkgs.nerdfonts.override {fonts = ["GeistMono"];}; + name = "Geist Mono Vercel Nerd Font Mono"; + }; + sansSerif = { + package = pkgs.liberation_ttf; + name = "Liberation Sans"; + }; + serif = { + package = pkgs.eb-garamond; + name = "EB Garamond Regular"; + }; + sizes = { + applications = 12; + terminal = 14; + desktop = 12; + popups = 10; + }; + }; + opacity = { + applications = 1.0; + terminal = 0.8; + desktop = 1.0; + popups = 1.0; + }; + }; +} diff --git a/systems/jeroboam/default.nix b/systems/jeroboam/default.nix index b260932..e0a2f57 100644 --- a/systems/jeroboam/default.nix +++ b/systems/jeroboam/default.nix @@ -10,15 +10,15 @@ { inputs, configLib, ... }: { imports = [ - #################### Every Host Needs This #################### + # ================= Every Host Needs This ==================== # ./hardware-configuration.nix - #################### Hardware Modules #################### + # ==================== Hardware Modules ====================== # inputs.hardware.nixosModules.common-cpu-amd inputs.hardware.nixosModules.common-gpu-amd inputs.hardware.nixosModules.common-pc-ssd - #################### Disk Layout #################### + # ====================== Disk Layout ========================= # inputs.disko.nixosModules.disko ( configLib.relativeToRoot "systems/common/disks/jeroboam.nix") { @@ -28,12 +28,15 @@ swapSize = "16"; }; } + + # ======================= Themeing ========================== # + inputs.stylix.nixosModules.stylix ] ++ (map configLib.relativeToRoot [ # = Required Configs #################### "systems/common/core" - #################### Host-specific Configs #################### + # --------------- Host-specific Configs -------------------- # #"systems/common/optional/services/clamav.nix" # depends on optional/msmtp.nix #"systems/common/optional/msmtp.nix" # required for emailing clamav alerts #"systems/common/optional/services/openssh.nix" # allow remote ssh @@ -42,13 +45,17 @@ "systems/common/optional/boot/loud_boot.nix" # for testing, otherwise quiet_boot.nix #"systems/common/optional/boot/quiet_boot.nix" # with plymouth pretty custom load sequence "systems/common/optional/boot/initrd_luks.nix" # luks encryption with pass only - # Desktop + + # ------------------------ Desktop --------------------------- # #"systems/common/optional/services/greetd.nix" # display manager #"systems/common/optional/hyprland.nix" # window manager - #################### Users to Create #################### + + # ---------------------- Users to Create ---------------------- # #"systems/common/users/zhuangzi" "systems/common/users/laozi" + # ---------------------- Themeing ----------------------------- # + "systems/common/optional/stylix.nix" ]); # set custom autologin options. see greetd.nix for details