before npins
This commit is contained in:
parent
d429476553
commit
63fbd6d499
22 changed files with 627 additions and 330 deletions
|
@ -1,12 +1,17 @@
|
|||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
system,
|
||||
inputs,
|
||||
self,
|
||||
sharedModules,
|
||||
...
|
||||
}:
|
||||
with inputs;
|
||||
let
|
||||
nix-rice = import "${inputs.nix-rice}/lib.nix" {
|
||||
inherit (nixpkgs) lib;
|
||||
kitty-themes-src = { };
|
||||
};
|
||||
rice = import ./rice.nix { inherit system nixpkgs nix-rice; };
|
||||
in
|
||||
{
|
||||
systems =
|
||||
definitions:
|
||||
|
@ -15,7 +20,7 @@
|
|||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
inherit inputs rice nix-rice;
|
||||
mainUser = info.user;
|
||||
};
|
||||
modules =
|
||||
|
@ -26,7 +31,7 @@
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs self;
|
||||
inherit inputs rice nix-rice;
|
||||
mainUser = info.user;
|
||||
};
|
||||
users.${info.user}.imports = [
|
||||
|
|
170
util/rice.nix
170
util/rice.nix
|
@ -1,122 +1,140 @@
|
|||
final: prev:
|
||||
{
|
||||
nixpkgs,
|
||||
nix-rice,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (prev.lib.nix-rice) kitty-themes;
|
||||
inherit (prev.lib.nix-rice.palette) toRGBShortHex;
|
||||
# theme = kitty-themes.parseTheme ./op.pal;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit (nix-rice) kitty-themes;
|
||||
inherit (nix-rice.palette) toRGBShortHex;
|
||||
theme = kitty-themes.parseTheme ./pal.conf;
|
||||
in
|
||||
# theme = kitty-themes.getThemeByName "everforest_dark_hard";
|
||||
{
|
||||
rice = rec {
|
||||
palette = {
|
||||
normal = {
|
||||
black = theme.color0;
|
||||
red = theme.color1;
|
||||
green = theme.color2;
|
||||
yellow = theme.color3;
|
||||
blue = theme.color4;
|
||||
magenta = theme.color5;
|
||||
cyan = theme.color6;
|
||||
white = theme.color7;
|
||||
};
|
||||
bright = {
|
||||
black = theme.color8;
|
||||
red = theme.color9;
|
||||
green = theme.color10;
|
||||
yellow = theme.color11;
|
||||
blue = theme.color12;
|
||||
magenta = theme.color13;
|
||||
cyan = theme.color14;
|
||||
white = theme.color15;
|
||||
};
|
||||
util = {
|
||||
fg = theme.foreground;
|
||||
bg = theme.background;
|
||||
fg_sel = theme.selection_foreground;
|
||||
bg_sel = theme.selection_background;
|
||||
inherit (theme) cursor;
|
||||
# url = theme.url_color;
|
||||
};
|
||||
} // theme;
|
||||
rec {
|
||||
palette = {
|
||||
normal = {
|
||||
black = theme.color0;
|
||||
red = theme.color1;
|
||||
green = theme.color2;
|
||||
yellow = theme.color3;
|
||||
blue = theme.color4;
|
||||
magenta = theme.color5;
|
||||
cyan = theme.color6;
|
||||
white = theme.color7;
|
||||
};
|
||||
bright = {
|
||||
black = theme.color8;
|
||||
red = theme.color9;
|
||||
green = theme.color10;
|
||||
yellow = theme.color11;
|
||||
blue = theme.color12;
|
||||
magenta = theme.color13;
|
||||
cyan = theme.color14;
|
||||
white = theme.color15;
|
||||
};
|
||||
util = {
|
||||
fg = theme.foreground;
|
||||
bg = theme.background;
|
||||
fg_sel = theme.selection_foreground;
|
||||
bg_sel = theme.selection_background;
|
||||
inherit (theme) cursor;
|
||||
# url = theme.url_color;
|
||||
};
|
||||
} // theme;
|
||||
|
||||
fonts = rec {
|
||||
fonts =
|
||||
let
|
||||
sans = {
|
||||
name = "Inria Sans";
|
||||
size = 12;
|
||||
package = final.inriafonts;
|
||||
package = pkgs.inriafonts;
|
||||
};
|
||||
serif = {
|
||||
name = "Inria Serif";
|
||||
size = 12;
|
||||
package = final.inriafonts;
|
||||
package = pkgs.inriafonts;
|
||||
};
|
||||
monospace = {
|
||||
name = "Fira Code";
|
||||
size = 10;
|
||||
package = final.fira-code;
|
||||
package = pkgs.fira-code;
|
||||
};
|
||||
emoji = {
|
||||
name = "Twitter Color Emoji";
|
||||
size = 12;
|
||||
package = final.twemoji-color-font;
|
||||
package = pkgs.twemoji-color-font;
|
||||
};
|
||||
pkgs = with final; [
|
||||
in
|
||||
{
|
||||
inherit
|
||||
sans
|
||||
serif
|
||||
monospace
|
||||
emoji
|
||||
;
|
||||
pkgs = [
|
||||
sans.package
|
||||
serif.package
|
||||
monospace.package
|
||||
emoji.package
|
||||
meslo-lgs-nf
|
||||
pkgs.meslo-lgs-nf
|
||||
];
|
||||
};
|
||||
|
||||
icons = rec {
|
||||
icons =
|
||||
let
|
||||
package = pkgs.papirus-icon-theme;
|
||||
in
|
||||
{
|
||||
inherit package;
|
||||
name = "Papirus-Dark";
|
||||
package = final.papirus-icon-theme;
|
||||
pkgs = with final; [
|
||||
pkgs = [
|
||||
package
|
||||
# material-icons
|
||||
# material-design-icons
|
||||
];
|
||||
};
|
||||
|
||||
gtk-theme = {
|
||||
name = "nix-rice";
|
||||
package = prev.callPackage ./gtk-theme.nix { } { palette = toRGBShortHex final.rice.palette; };
|
||||
};
|
||||
gtk-theme = {
|
||||
name = "nix-rice";
|
||||
package = pkgs.callPackage ./gtk-theme.nix { } { palette = toRGBShortHex palette; };
|
||||
};
|
||||
|
||||
borders = {
|
||||
thickness = 6;
|
||||
rounding = 0;
|
||||
gaps_in = 16;
|
||||
gaps_out = 72;
|
||||
};
|
||||
borders = {
|
||||
thickness = 6;
|
||||
rounding = 0;
|
||||
gaps_in = 16;
|
||||
gaps_out = 72;
|
||||
};
|
||||
|
||||
bg = {
|
||||
image = prev.callPackage ./wallpaper.nix { } {
|
||||
palette = toRGBShortHex final.rice.palette;
|
||||
wallpaper = builtins.path rec {
|
||||
name = "wallpaper.jpg";
|
||||
path = ../${name};
|
||||
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
|
||||
};
|
||||
bg = {
|
||||
image = pkgs.callPackage ./wallpaper.nix { } {
|
||||
palette = toRGBShortHex palette;
|
||||
wallpaper = builtins.path rec {
|
||||
name = "wallpaper.jpg";
|
||||
path = ../${name};
|
||||
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = prev.afterglow-cursors-recolored.override {
|
||||
themeVariants = [ "Dracula" ];
|
||||
draculaColorVariants = [ "Orange" ];
|
||||
};
|
||||
name = "Afterglow-Recolored-Dracula-Orange";
|
||||
cursor = {
|
||||
package = pkgs.afterglow-cursors-recolored.override {
|
||||
themeVariants = [ "Dracula" ];
|
||||
draculaColorVariants = [ "Orange" ];
|
||||
};
|
||||
name = "Afterglow-Recolored-Dracula-Orange";
|
||||
};
|
||||
|
||||
plymouth = {
|
||||
# no easy way to automate filename sadly - could try stripping "real" font name of spaces?
|
||||
plymouth =
|
||||
let
|
||||
theme = "spinner_alt";
|
||||
in
|
||||
{
|
||||
inherit theme;
|
||||
font = "${fonts.sans.package}/share/fonts/truetype/InriaSans-Regular.ttf";
|
||||
theme = "colorful_loop";
|
||||
themePackages = [
|
||||
(prev.pkgs.adi1090x-plymouth-themes.override { selected_themes = [ "colorful_loop" ]; })
|
||||
(pkgs.adi1090x-plymouth-themes.override { selected_themes = [ theme ]; })
|
||||
];
|
||||
};
|
||||
}; # /rice
|
||||
}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
{ pkgs }:
|
||||
{ pkgs, lib }:
|
||||
{
|
||||
palette,
|
||||
wallpaper,
|
||||
}:
|
||||
let
|
||||
str_pal =
|
||||
with pkgs.lib;
|
||||
let
|
||||
inherit (lib) concatStringsSep;
|
||||
inherit (builtins) foldl' attrValues;
|
||||
in
|
||||
concatStringsSep " " (
|
||||
builtins.foldl' (acc: el: acc ++ (attrValues el)) [ ] [ palette.normal palette.bright palette.util ]
|
||||
foldl' (acc: el: acc ++ (attrValues el)) [ ] [ palette.normal palette.bright palette.util ]
|
||||
);
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "generated-wallpaper.png";
|
||||
src = wallpaper;
|
||||
buildInputs = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue