From 1bf362e4a0c45a961ffc9a5f90f6291fa92e5d4d Mon Sep 17 00:00:00 2001 From: ooks-io Date: Sat, 20 Apr 2024 21:41:28 +1200 Subject: [PATCH] feat(ooksphone) add colorscheme --- home/profile/themes/default.nix | 2 ++ home/profile/themes/phone/default.nix | 28 +++++++++++++++++ home/user/ooks/ooksphone/default.nix | 9 +++--- system/hosts/ooksphone/default.nix | 9 +++--- system/hosts/ooksphone/theme.nix | 43 +++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 home/profile/themes/phone/default.nix create mode 100644 system/hosts/ooksphone/theme.nix diff --git a/home/profile/themes/default.nix b/home/profile/themes/default.nix index 640bbe5..77e4642 100644 --- a/home/profile/themes/default.nix +++ b/home/profile/themes/default.nix @@ -7,10 +7,12 @@ { imports = [ ./minimal + ./phone ]; options.theme = { minimal.enable = lib.mkEnableOption "enable minimal theme"; + phone.enable = lib.mkEnableOption "Enable phone theme"; }; # config = { diff --git a/home/profile/themes/phone/default.nix b/home/profile/themes/phone/default.nix new file mode 100644 index 0000000..8db386f --- /dev/null +++ b/home/profile/themes/phone/default.nix @@ -0,0 +1,28 @@ +{ lib, config, pkgs, inputs, ... }: + +let + cfg = config.theme.phone; + inherit (inputs.nix-colors) colorSchemes; +in + +{ + imports = [ inputs.nix-colors.homeManagerModule ]; + config = lib.mkIf cfg.enable { + + colorscheme = colorSchemes.gruvbox-material-dark-soft; + home.file.".colorscheme".text = config.colorscheme.slug; + home.sessionVariables.COLOR_SCHEME = "${config.colorscheme.slug}"; + + homeModules.theme = { + fonts.enable = true; + fonts.regular = { + family = "Fira Sans"; + package = pkgs.fira; + }; + fonts.monospace = { + family = "JetBrainsMono Nerd Font"; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; + }; + }; + }; +} diff --git a/home/user/ooks/ooksphone/default.nix b/home/user/ooks/ooksphone/default.nix index 6604a2b..ea45986 100644 --- a/home/user/ooks/ooksphone/default.nix +++ b/home/user/ooks/ooksphone/default.nix @@ -1,16 +1,17 @@ -{ inputs, outputs, config, ... }: +{ ... }: + { imports = [ - ../../../modules + ../../../profiles ]; + theme.phone.enable = true; + homeModules = { console.editor.helix.enable = true; }; - home.sessionVariables.HN = "ooksphone"; - home.stateVersion = "23.11"; } diff --git a/system/hosts/ooksphone/default.nix b/system/hosts/ooksphone/default.nix index 841f2e4..7488072 100644 --- a/system/hosts/ooksphone/default.nix +++ b/system/hosts/ooksphone/default.nix @@ -1,10 +1,10 @@ -{ config, lib, pkgs, inputs, outputs, ... }: +{ pkgs, inputs, outputs, ... }: { - # Simply install just the packages + imports = [ ./theme.nix ]; + environment.packages = with pkgs; [ - # User-facing stuff that you really really want to have - helix # or some other editor, e.g. nano or neovim + helix git killall hostname @@ -26,7 +26,6 @@ shell = "${pkgs.fish}/bin/fish"; }; - # Configure home-manager home-manager = { backupFileExtension = "hm-bak"; useGlobalPkgs = true; diff --git a/system/hosts/ooksphone/theme.nix b/system/hosts/ooksphone/theme.nix new file mode 100644 index 0000000..829bcb2 --- /dev/null +++ b/system/hosts/ooksphone/theme.nix @@ -0,0 +1,43 @@ +{ pkgs, ... }: + +let + fontPackage = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; + fontPath = "/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf"; +in + +{ + terminal = { + font = fontPackage + fontPath; + + # Gruvbox Material Dark Soft + colors = { + background = "#32302F"; + foreground = "#DDC7A1"; + cursor = "#DDC7A1"; + + color0 = "#32302F"; # Black + color8 = "#7C6F64"; # Bright Black + + color1 = "#EA6962"; # Red + color9 = "#EA6962"; # Bright Red + + color2 = "#A9B665"; # Green + color10 = "#A9B665"; # Bright Green + + color3 = "#D8A657"; # Yellow + color11 = "#D8A657"; # Bright Yellow + + color4 = "#7DAEA3"; # Blue + color12 = "#7DAEA3"; # Bright Blue + + color5 = "#D3869B"; # Magenta + color13 = "#D3869B"; # Bright Magenta + + color6 = "#89B482"; # Cyan + color14 = "#89B482"; # Bright Cyan + + color7 = "#DDC7A1"; # White + color15 = "#FBF1C7"; # Bright White + }; + }; +}