Skip to content

Commit

Permalink
Merge branch 'master' into wallpaper-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
danth authored Oct 10, 2023
2 parents d6a2dd3 + 4d76e2d commit c176990
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 58 deletions.
136 changes: 136 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 37 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@
url = "github:edolstra/flake-compat";
flake = false;
};

# Templates
base16-alacritty = {
url = "github:aarowill/base16-alacritty";
flake = false;
};
base16-fish = {
url = "github:tomyun/base16-fish";
flake = false;
};
base16-foot = {
url = "github:tinted-theming/base16-foot";
flake = false;
};
base16-helix = {
url = "github:tinted-theming/base16-helix";
flake = false;
};
base16-kitty = {
url = "github:kdrag0n/base16-kitty";
flake = false;
};
base16-tmux = {
url = "github:tinted-theming/base16-tmux";
flake = false;
};
base16-vim = {
url = "github:chriskempson/base16-vim";
flake = false;
};
base16-xresources = {
url = "github:tinted-theming/base16-xresources";
flake = false;
};
};

outputs =
Expand All @@ -39,7 +73,7 @@

nixosModules.stylix = { pkgs, ... }@args: {
imports = [
(import ./stylix/nixos {
(import ./stylix/nixos inputs {
inherit (self.packages.${pkgs.system}) palette-generator;
base16 = base16.lib args;
homeManagerModule = self.homeManagerModules.stylix;
Expand All @@ -53,7 +87,7 @@

homeManagerModules.stylix = { pkgs, ... }@args: {
imports = [
(import ./stylix/hm {
(import ./stylix/hm inputs {
inherit (self.packages.${pkgs.system}) palette-generator;
base16 = base16.lib args;
})
Expand All @@ -66,7 +100,7 @@

darwinModules.stylix = { pkgs, ... }@args: {
imports = [
(import ./stylix/darwin {
(import ./stylix/darwin inputs {
inherit (self.packages.${pkgs.system}) palette-generator;
base16 = base16.lib args;
homeManagerModule = self.homeManagerModules.stylix;
Expand Down
8 changes: 2 additions & 6 deletions modules/alacritty/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ with config.stylix.fonts;

let
themeFile = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "aarowill";
repo = "base16-alacritty";
rev = "914727e48ebf3eab1574e23ca0db0ecd0e5fe9d0";
sha256 = "sha256-oDsuiKx8gt+Ov7hZ9PibIQtE81IRSLO+n5N99WeiK34=";
};
templateRepo = config.lib.stylix.templates.base16-alacritty;
};

in
{
options.stylix.targets.alacritty.enable =
Expand Down
11 changes: 4 additions & 7 deletions modules/bat/hm.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{ pkgs, config, lib, ... }:

let
themeFile = config.stylix.colors {
template = ./base16-stylix.mustache;
extension = ".tmTheme";
};
in
{
options.stylix.targets.bat.enable =
config.lib.stylix.mkEnableTarget "Bat" config.programs.bat.enable;

config = lib.mkIf config.stylix.targets.bat.enable {
programs.bat.themes."base16-stylix" = builtins.readFile themeFile;
programs.bat.themes."base16-stylix".src = config.stylix.colors {
template = ./base16-stylix.mustache;
extension = ".tmTheme";
};
home.sessionVariables.BAT_THEME = "base16-stylix";
};
}
8 changes: 2 additions & 6 deletions modules/fish/prompt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

let
theme = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tomyun";
repo = "base16-fish";
rev = "7f647967fddedaf803191bc9113b13d2071dc3cf";
sha256 = "IGUbLjsmmAvB9UKGkR7oqdpjeVEfzt83GpyBkrZf2O4=";
};
templateRepo = config.lib.stylix.templates.base16-fish;
};

in ''
source ${theme}
base16-${config.stylix.colors.slug}
Expand Down
7 changes: 1 addition & 6 deletions modules/foot/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ let
cfg = config.stylix.targets.foot;

theme = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-foot";
rev = "22579065fbe21361b64d80bae798666efaa85ce0";
sha256 = "gb43UufuN6iRu6MfTZP+a3GUUQ+hKa5e6G4IiWEc68A=";
};
templateRepo = config.lib.stylix.templates.base16-foot;
};

in {
Expand Down
7 changes: 1 addition & 6 deletions modules/helix/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

let
theme = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-helix";
rev = "3e391da3aaf2fa43dc9cfb67e4e6216c7ce163dc";
sha256 = "elhPirlFx9UaZGTht9jFl8lLfT4Af38ITTPJT90yrHs=";
};
templateRepo = config.lib.stylix.templates.base16-helix;
};

# Removing the background exposes transparency from the terminal. The
Expand Down
9 changes: 3 additions & 6 deletions modules/kitty/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

let
cfg = config.stylix.targets.kitty;

theme = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "kdrag0n";
repo = "base16-kitty";
rev = "06bb401fa9a0ffb84365905ffbb959ae5bf40805";
sha256 = "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=";
};
templateRepo = config.lib.stylix.templates.base16-kitty;
target = if cfg.variant256Colors then "default-256" else "default";
};

in {
options.stylix.targets.kitty = {
enable = config.lib.stylix.mkEnableTarget "Kitty" true;
Expand Down
7 changes: 1 addition & 6 deletions modules/tmux/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

let
theme = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-tmux";
rev = "30fc84afc723e027d4497a284fcae3cb75097441";
sha256 = "JJ/eRqTayuEKrL9MBe943HpKy7yLyd2Dmes58KN1jdk=";
};
templateRepo = config.lib.stylix.templates.base16-tmux;
};

in {
Expand Down
7 changes: 1 addition & 6 deletions modules/vim/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ with lib;

let
themeFile = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "chriskempson";
repo = "base16-vim";
rev = "6191622d5806d4448fa2285047936bdcee57a098";
sha256 = "6FsT87qcl9GBxgxrPx2bPULIMA/O8TRxHaN49qMM4uM=";
};
templateRepo = config.lib.stylix.templates.base16-vim;
};

themePlugin = pkgs.vimUtils.buildVimPlugin {
Expand Down
8 changes: 2 additions & 6 deletions modules/xresources/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ with config.stylix.fonts;

let
themeFile = config.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tinted-theming";
repo = "base16-xresources";
rev = "6711cf4fa61e903e52ef6eac186b83e04a0397d8";
sha256 = "sha256-WazWviLhQRCyF9EBi2IDn9h8wrKc00PpqtltFDpUP5Q=";
};
templateRepo = config.lib.stylix.templates.base16-xresources;
};

in
{
options.stylix.targets.xresources.enable =
Expand Down
2 changes: 2 additions & 0 deletions stylix/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
inputs:
{ palette-generator, base16, homeManagerModule }:
{ options, config, lib, ... }:

Expand All @@ -9,6 +10,7 @@ in {
../target.nix
./fonts.nix
(import ./etc.nix { inherit palette-generator base16; })
(import ../templates.nix inputs)
] ++ autoload;

options.stylix.homeManagerIntegration = {
Expand Down
2 changes: 2 additions & 0 deletions stylix/hm/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
inputs:
{ palette-generator, base16 }:
{ config, lib, ... }:

Expand All @@ -9,5 +10,6 @@ in {
../opacity.nix
./fonts.nix
(import ./xdg.nix { inherit palette-generator base16; })
(import ../templates.nix inputs)
] ++ autoload;
}
Loading

0 comments on commit c176990

Please sign in to comment.