refactor: move dracula from common overlays to pkgs
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
fe7b03dd4a
commit
a51db7b00f
23 changed files with 154 additions and 107 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
|
@ -41,15 +42,10 @@
|
|||
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "dracula-bat";
|
||||
};
|
||||
themes = {
|
||||
dracula-bat = {
|
||||
src = pkgs.dracula-theme;
|
||||
file = "bat";
|
||||
};
|
||||
};
|
||||
|
||||
config.theme = "dracula-bat";
|
||||
themes.dracula-bat.src = self.packages.${pkgs.system}.dracula.bat;
|
||||
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
];
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
includes = [
|
||||
{path = "${pkgs.dracula-theme}/git-colors";}
|
||||
{path = toString self.packages.${pkgs.system}.dracula.git;}
|
||||
|
||||
{
|
||||
condition = "hasconfig:remote.*.url:git@github.com:*/**";
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
])
|
||||
++ (with pkgs; [
|
||||
dig.dnsutils
|
||||
dracula-theme
|
||||
imagemagick
|
||||
killall
|
||||
mosh
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
grim-hyprland,
|
||||
nixpkgs-wayland,
|
||||
...
|
||||
} @ inputs: [
|
||||
(import ./dracula-theme inputs)
|
||||
|
||||
}: [
|
||||
grim-hyprland.overlays.default
|
||||
nixpkgs-wayland.overlay
|
||||
]
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
bat-theme-src,
|
||||
gtk-theme-src,
|
||||
xresources-src,
|
||||
...
|
||||
} @ inputs: (final: prev: {
|
||||
dracula-theme = prev.dracula-theme.overrideAttrs (oldAttrs: let
|
||||
git-colors = prev.callPackage ./git.nix inputs;
|
||||
plymouth = prev.callPackage ./plymouth.nix inputs;
|
||||
wallpaper = prev.fetchurl (import ./wallpaper.nix);
|
||||
in {
|
||||
version = gtk-theme-src.shortRev;
|
||||
src = gtk-theme-src;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/plymouth/themes $out/wallpapers
|
||||
cp -a ${wallpaper} $out/wallpapers/waves.png
|
||||
|
||||
cp -a ${bat-theme-src}/Dracula.tmTheme $out/bat
|
||||
cp -a ${git-colors}/git-colors $out/git-colors
|
||||
cp -a ${plymouth}/share/plymouth/themes/dracula $out/share/plymouth/themes/
|
||||
cp -a ${xresources-src}/Xresources $out/xres
|
||||
|
||||
# -------------------------------------------
|
||||
mkdir -p $out/share/themes/Dracula
|
||||
cp -a {assets,cinnamon,gnome-shell,gtk-2.0,gtk-3.0,gtk-3.20,gtk-4.0,index.theme,metacity-1,unity,xfwm4} $out/share/themes/Dracula
|
||||
|
||||
cp -a kde/{color-schemes,plasma} $out/share/
|
||||
cp -a kde/kvantum $out/share/Kvantum
|
||||
|
||||
mkdir -p $out/share/aurorae/themes
|
||||
cp -a kde/aurorae/* $out/share/aurorae/themes/
|
||||
|
||||
mkdir -p $out/share/sddm/themes
|
||||
cp -a kde/sddm/* $out/share/sddm/themes/
|
||||
|
||||
mkdir -p $out/share/icons/Dracula-cursors
|
||||
mv kde/cursors/Dracula-cursors/index.theme $out/share/icons/Dracula-cursors/cursor.theme
|
||||
mv kde/cursors/Dracula-cursors/cursors $out/share/icons/Dracula-cursors/cursors
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
})
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
stdenv,
|
||||
git-theme-src,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "dracula-git";
|
||||
version = git-theme-src.shortRev;
|
||||
|
||||
src = git-theme-src;
|
||||
|
||||
installPhase = ''
|
||||
# Git colors
|
||||
cp -a ./config/gitconfig ./git-colors
|
||||
chmod 777 ./git-colors
|
||||
|
||||
line=$(grep -n 'Dracula Dark Theme' ./git-colors | cut -d: -f1)
|
||||
sed -i "1,$((line-1))d" ./git-colors
|
||||
|
||||
mkdir $out
|
||||
cp -a ./git-colors $out
|
||||
'';
|
||||
}
|
17
flake.lock
17
flake.lock
|
@ -1878,6 +1878,7 @@
|
|||
"piper-src": "piper-src",
|
||||
"pokemon-colorscripts-src": "pokemon-colorscripts-src",
|
||||
"secrets": "secrets",
|
||||
"sioyek-theme-src": "sioyek-theme-src",
|
||||
"sops-nix": "sops-nix_2",
|
||||
"stylelint-lsp": "stylelint-lsp",
|
||||
"subsync": "subsync",
|
||||
|
@ -1925,6 +1926,22 @@
|
|||
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
||||
}
|
||||
},
|
||||
"sioyek-theme-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1669165291,
|
||||
"narHash": "sha256-+HzxZA8Bb+cGogK+w4JES4ZFG+ueXEAuLu+0T18fvbc=",
|
||||
"owner": "dracula",
|
||||
"repo": "sioyek",
|
||||
"rev": "b832ab04d880fbe243c0fe9043612be61226426e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dracula",
|
||||
"repo": "sioyek",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
@ -283,6 +283,12 @@
|
|||
type = "git";
|
||||
url = "ssh://git@git.nelim.org/matt1432/nixos-secrets";
|
||||
};
|
||||
sioyek-theme-src = {
|
||||
flake = false;
|
||||
owner = "dracula";
|
||||
repo = "sioyek";
|
||||
type = "github";
|
||||
};
|
||||
sops-nix = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
owner = "Mic92";
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (self.packages.${pkgs.system}) dracula;
|
||||
in {
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./qt.nix
|
||||
|
@ -6,7 +12,7 @@
|
|||
|
||||
home.pointerCursor = {
|
||||
name = "Dracula-cursors";
|
||||
package = pkgs.dracula-theme;
|
||||
package = dracula.gtk;
|
||||
size = 24;
|
||||
|
||||
gtk.enable = true;
|
||||
|
@ -19,5 +25,5 @@
|
|||
|
||||
xresources.extraConfig =
|
||||
builtins.readFile
|
||||
"${pkgs.dracula-theme}/xres";
|
||||
"${dracula.xresources}";
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) fontSize;
|
||||
inherit (self.packages.${pkgs.system}) dracula;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
|
@ -32,8 +34,8 @@ in {
|
|||
style='';
|
||||
# The newline before this must be there
|
||||
in {
|
||||
"Kvantum/Dracula/Dracula.kvconfig".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig";
|
||||
"Kvantum/Dracula/Dracula.svg".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.svg";
|
||||
"Kvantum/Dracula/Dracula.kvconfig".source = "${dracula.gtk}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig";
|
||||
"Kvantum/Dracula/Dracula.svg".source = "${dracula.gtk}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.svg";
|
||||
"Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula";
|
||||
|
||||
"qt5ct/qt5ct.conf".text = qtconf + "kvantum";
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
wpaperd,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs.writers) writeTOML;
|
||||
wpaperdPkg = wpaperd.packages.${pkgs.system}.default;
|
||||
wallpaper = "${pkgs.dracula-theme}/wallpapers/waves.png";
|
||||
in {
|
||||
home.packages = [wpaperdPkg];
|
||||
|
||||
xdg.configFile."wpaperd/config.toml".source = writeTOML "config.toml" {
|
||||
default = {
|
||||
path = wallpaper;
|
||||
path = toString self.packages.${pkgs.system}.dracula.wallpaper;
|
||||
mode = "stretch";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -281,6 +281,11 @@ let
|
|||
owner = "dracula";
|
||||
repo = "xresources";
|
||||
}
|
||||
{
|
||||
name = "sioyek-theme-src";
|
||||
owner = "dracula";
|
||||
repo = "sioyek";
|
||||
}
|
||||
];
|
||||
in {
|
||||
inherit mkDep mkInput mkSrc;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
jellyfin-flake,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) makeLibraryPath optionalString;
|
||||
|
@ -51,19 +52,11 @@ in {
|
|||
programs.sioyek = {
|
||||
enable = true;
|
||||
|
||||
config = let
|
||||
# TODO: put this with the rest of the themes
|
||||
dracula-theme = pkgs.fetchFromGitHub {
|
||||
owner = "dracula";
|
||||
repo = "sioyek";
|
||||
rev = "b832ab04d880fbe243c0fe9043612be61226426e";
|
||||
hash = "sha256-+HzxZA8Bb+cGogK+w4JES4ZFG+ueXEAuLu+0T18fvbc=";
|
||||
};
|
||||
in {
|
||||
config = {
|
||||
startup_commands = "toggle_custom_color";
|
||||
ui_font = "JetBrainsMono Nerd Font Mono Regular";
|
||||
font_size = "24";
|
||||
source = "${dracula-theme}/dracula.config";
|
||||
source = toString self.packages.${pkgs.system}.dracula.sioyek;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
initrd = {
|
||||
verbose = false;
|
||||
|
@ -20,7 +24,7 @@
|
|||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
themePackages = [pkgs.dracula-theme];
|
||||
themePackages = [self.packages.${pkgs.system}.dracula.plymouth];
|
||||
theme = "dracula";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
pam-fprint-grosshack-src,
|
||||
pokemon-colorscripts-src,
|
||||
...
|
||||
}: {
|
||||
} @ inputs: {
|
||||
coloryou = pkgs.callPackage ./coloryou {};
|
||||
|
||||
curseforge-server-downloader = pkgs.callPackage ./curseforge-server-downloader {
|
||||
inherit curseforge-server-downloader-src;
|
||||
};
|
||||
|
||||
dracula = import ./dracula inputs;
|
||||
|
||||
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
|
||||
inherit pam-fprint-grosshack-src;
|
||||
};
|
||||
|
|
15
pkgs/dracula/bat.nix
Normal file
15
pkgs/dracula/bat.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
bat-theme-src,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-bat";
|
||||
version = bat-theme-src.shortRev;
|
||||
|
||||
src = bat-theme-src;
|
||||
|
||||
installPhase = ''
|
||||
cat ./Dracula.tmTheme > $out
|
||||
'';
|
||||
}
|
9
pkgs/dracula/default.nix
Normal file
9
pkgs/dracula/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...} @ inputs: {
|
||||
bat = pkgs.callPackage ./bat.nix {inherit (inputs) bat-theme-src;};
|
||||
git = pkgs.callPackage ./git.nix {inherit (inputs) git-theme-src;};
|
||||
gtk = import ./gtk.nix {inherit (inputs) gtk-theme-src pkgs;};
|
||||
plymouth = pkgs.callPackage ./plymouth.nix {inherit (inputs) dracula-plymouth-src;};
|
||||
sioyek = pkgs.callPackage ./sioyek.nix {inherit (inputs) sioyek-theme-src;};
|
||||
wallpaper = pkgs.fetchurl (import ./wallpaper.nix);
|
||||
xresources = pkgs.callPackage ./xresources.nix {inherit (inputs) xresources-src;};
|
||||
}
|
21
pkgs/dracula/git.nix
Normal file
21
pkgs/dracula/git.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
stdenv,
|
||||
git-theme-src,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-git";
|
||||
version = git-theme-src.shortRev;
|
||||
|
||||
src = git-theme-src;
|
||||
|
||||
installPhase = ''
|
||||
chmod 777 ./config/gitconfig
|
||||
|
||||
# Remove every line above 'Dracula Dark Theme'
|
||||
line=$(grep -n 'Dracula Dark Theme' ./config/gitconfig | cut -d: -f1)
|
||||
sed -i "1,$((line-1))d" ./config/gitconfig
|
||||
|
||||
cat ./config/gitconfig > $out
|
||||
'';
|
||||
}
|
9
pkgs/dracula/gtk.nix
Normal file
9
pkgs/dracula/gtk.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
gtk-theme-src,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.dracula-theme.overrideAttrs {
|
||||
version = gtk-theme-src.shortRev;
|
||||
src = gtk-theme-src;
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "dracula-plymouth";
|
||||
pname = "dracula-plymouth";
|
||||
version = dracula-plymouth-src.shortRev;
|
||||
|
||||
src = dracula-plymouth-src;
|
15
pkgs/dracula/sioyek.nix
Normal file
15
pkgs/dracula/sioyek.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
sioyek-theme-src,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-sioyek";
|
||||
version = sioyek-theme-src.shortRev;
|
||||
|
||||
src = sioyek-theme-src;
|
||||
|
||||
installPhase = ''
|
||||
cat ./dracula.config > $out
|
||||
'';
|
||||
}
|
15
pkgs/dracula/xresources.nix
Normal file
15
pkgs/dracula/xresources.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
xresources-src,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-xresources";
|
||||
version = xresources-src.shortRev;
|
||||
|
||||
src = xresources-src;
|
||||
|
||||
installPhase = ''
|
||||
cat ./Xresources > $out
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue