mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
add overrides.nix + custom fonts
This commit is contained in:
parent
040a4319a4
commit
499a7e5b38
133
apps/apps.nix
133
apps/apps.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, inputs, stable, self, ... }:
|
{ pkgs, lib, inputs, stable, unstable, self, ... }:
|
||||||
let
|
let
|
||||||
lock-false = {
|
lock-false = {
|
||||||
Value = false;
|
Value = false;
|
||||||
|
|
@ -8,40 +8,10 @@ let
|
||||||
Value = true;
|
Value = true;
|
||||||
Status = "locked";
|
Status = "locked";
|
||||||
};
|
};
|
||||||
kitty_config = pkgs.writeText "kitty.conf" ''
|
|
||||||
# See https://sw.kovidgoyal.net/kitty/conf.html
|
|
||||||
shell_integration no-rc
|
|
||||||
|
|
||||||
allow_remote_control password
|
|
||||||
background #171717
|
|
||||||
background_opacity 0.8
|
|
||||||
color0 #3F3F3F
|
|
||||||
color1 #705050
|
|
||||||
color10 #72D5A3
|
|
||||||
color11 #F0DFAF
|
|
||||||
color12 #94BFF3
|
|
||||||
color13 #EC93D3
|
|
||||||
color14 #93E0E3
|
|
||||||
color15 #FFFFFF
|
|
||||||
color2 #60B48A
|
|
||||||
color3 #DFAF8F
|
|
||||||
color4 #9AB8D7
|
|
||||||
color5 #DC8CC3
|
|
||||||
color6 #8CD0D3
|
|
||||||
color7 #DCDCCC
|
|
||||||
color8 #709080
|
|
||||||
color9 #DCA3A3
|
|
||||||
foreground #DCDCCC
|
|
||||||
hide_window_decorations yes
|
|
||||||
remember_window_size yes
|
|
||||||
remote_control_password kitty-notification-password-fish ls
|
|
||||||
|
|
||||||
font_family FiraCode Nerd Font
|
|
||||||
bold_font auto
|
|
||||||
italic_font auto
|
|
||||||
bold_italic_font auto
|
|
||||||
'';
|
|
||||||
shwewo = inputs.shwewo.packages.${pkgs.system};
|
shwewo = inputs.shwewo.packages.${pkgs.system};
|
||||||
|
overrides = import ./overrides.nix {
|
||||||
|
inherit inputs pkgs lib self stable unstable;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixvim.nixosModules.nixvim
|
inputs.nixvim.nixosModules.nixvim
|
||||||
|
|
@ -53,11 +23,13 @@ in {
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wl-clipboard-x11
|
wl-clipboard-x11
|
||||||
#(callPackage ../derivations/nu_plugin_dns.nix { })
|
#(callPackage ../derivations/nu_plugin_dns.nix { })
|
||||||
|
(fishPlugins.callPackage ../derivations/fish/fish-functions.nix { })
|
||||||
xorg.xwininfo
|
xorg.xwininfo
|
||||||
jq
|
jq
|
||||||
dropbox
|
dropbox
|
||||||
spotdl
|
spotdl
|
||||||
xfce.thunar
|
# xfce.thunar
|
||||||
|
(pkgs.xfce.thunar.override { thunarPlugins = [pkgs.xfce.thunar-archive-plugin]; })
|
||||||
rustdesk-flutter
|
rustdesk-flutter
|
||||||
autossh
|
autossh
|
||||||
scrcpy
|
scrcpy
|
||||||
|
|
@ -76,41 +48,51 @@ in {
|
||||||
wget
|
wget
|
||||||
wlogout
|
wlogout
|
||||||
nom
|
nom
|
||||||
(vesktop.overrideAttrs (oldAttrs: {
|
|
||||||
desktopItems = [ (pkgs.makeDesktopItem {
|
|
||||||
name = "vesktop";
|
|
||||||
desktopName = "Discord";
|
|
||||||
exec = "vesktop %U";
|
|
||||||
icon = "discord";
|
|
||||||
startupWMClass = "Vesktop";
|
|
||||||
genericName = "Internet Messenger";
|
|
||||||
keywords = [ "discord" "vencord" "electron" "chat" ];
|
|
||||||
categories = [ "Network" "InstantMessaging" "Chat" ];
|
|
||||||
})];
|
|
||||||
}))
|
|
||||||
localsend
|
localsend
|
||||||
trayscale
|
trayscale
|
||||||
fishPlugins.done
|
fishPlugins.done
|
||||||
monero-gui
|
monero-gui
|
||||||
translate-shell
|
translate-shell
|
||||||
tridactyl-native #firefox tridactyl addon
|
# tridactyl-native #firefox tridactyl addon
|
||||||
ripgrep gh # for nvim
|
ripgrep gh
|
||||||
lunarvim # text edit
|
|
||||||
lexend # font from google (non-mono)
|
lexend # font from google (non-mono)
|
||||||
#fira-code-nerdfont # mono font
|
ibm-plex
|
||||||
iosevka-comfy.comfy
|
fira-code
|
||||||
iosevka-comfy.comfy-duo
|
# iosevka-comfy.comfy
|
||||||
iosevka-comfy.comfy-wide
|
# iosevka-comfy.comfy-duo
|
||||||
iosevka-comfy.comfy-wide-duo
|
# iosevka-comfy.comfy-wide
|
||||||
|
# iosevka-comfy.comfy-wide-duo
|
||||||
|
iosevka-comfy.comfy-motion-duo
|
||||||
jamesdsp easyeffects
|
jamesdsp easyeffects
|
||||||
nmap
|
nmap
|
||||||
wget
|
wget
|
||||||
shwewo.ephemeralbrowser
|
shwewo.ephemeralbrowser
|
||||||
shwewo.ruchrome
|
shwewo.ruchrome
|
||||||
shwewo.spotify
|
shwewo.spotify
|
||||||
|
#(pkgs.symlinkJoin {
|
||||||
|
# name = "ExprSelect";
|
||||||
|
# paths = [ shwewo.spotify ];
|
||||||
|
# buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
# postBuild = ''
|
||||||
|
# wrapProgram $out/bin/spotify --set NIXOS_OZONE_WL 0
|
||||||
|
# '';
|
||||||
|
#})
|
||||||
shwewo.audiorelay
|
shwewo.audiorelay
|
||||||
shwewo.tdesktop
|
shwewo.tdesktop
|
||||||
(pkgs.writeScriptBin "tlp" ''/run/wrappers/bin/sudo ${pkgs.tlp}/bin/tlp $@'')
|
(pkgs.writeScriptBin "tlp" ''/run/wrappers/bin/sudo ${pkgs.tlp}/bin/tlp $@'')
|
||||||
|
prismlauncher
|
||||||
|
stable.teleport_12 #work
|
||||||
|
tlrc #tldr
|
||||||
|
boxbuddy
|
||||||
|
stable.distrobox
|
||||||
|
atool #unarchive
|
||||||
|
open-interpreter
|
||||||
|
overrides.diosevka
|
||||||
|
# overrides.iosevka-comfy
|
||||||
|
overrides.vesktop
|
||||||
|
overrides.input-font
|
||||||
|
# overrides.input-fonts
|
||||||
|
stable.peazip
|
||||||
]);
|
]);
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
|
|
@ -145,7 +127,7 @@ in {
|
||||||
Status = "Locked";
|
Status = "Locked";
|
||||||
};
|
};
|
||||||
"browser.tabs.firefox-view" = lock-false;
|
"browser.tabs.firefox-view" = lock-false;
|
||||||
"browser.startup.homepage" = "https://ifconfig.me";
|
"browser.startup.homepage" = "about:blank";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265/17
|
# https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265/17
|
||||||
|
|
@ -178,10 +160,8 @@ in {
|
||||||
(extension "multi-account-containers" "@testpilot-containers")
|
(extension "multi-account-containers" "@testpilot-containers")
|
||||||
(extension "jkcs" "{6d9f4f04-2499-4fed-ae4a-02c5658c5d00}")
|
(extension "jkcs" "{6d9f4f04-2499-4fed-ae4a-02c5658c5d00}")
|
||||||
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
||||||
(extension "new-window-without-toolbar"
|
(extension "new-window-without-toolbar" "new-window-without-toolbar@tkrkt.com")
|
||||||
"new-window-without-toolbar@tkrkt.com")
|
(extension "open-in-spotify-desktop" "{04a727ec-f366-4f19-84bc-14b41af73e4d}")
|
||||||
(extension "open-in-spotify-desktop"
|
|
||||||
"{04a727ec-f366-4f19-84bc-14b41af73e4d}")
|
|
||||||
(extension "search_by_image" "{2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c}")
|
(extension "search_by_image" "{2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c}")
|
||||||
(extension "single-file" "{531906d3-e22f-4a6c-a102-8057b88a1a63}")
|
(extension "single-file" "{531906d3-e22f-4a6c-a102-8057b88a1a63}")
|
||||||
(extension "soundfixer" "soundfixer@unrelenting.technology")
|
(extension "soundfixer" "soundfixer@unrelenting.technology")
|
||||||
|
|
@ -202,15 +182,15 @@ in {
|
||||||
# ];
|
# ];
|
||||||
#};
|
#};
|
||||||
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
programs.xfconf.enable = true;
|
programs.xfconf.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.thunar.plugins = with pkgs.xfce; [
|
programs.thunar.enable = true;
|
||||||
thunar-archive-plugin
|
# programs.thunar.plugins = with pkgs.xfce; [
|
||||||
thunar-volman
|
# thunar-archive-plugin
|
||||||
];
|
# thunar-volman
|
||||||
|
# ];
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -225,17 +205,20 @@ in {
|
||||||
set -U __done_kitty_remote_control_password "kitty-notification-password-fish"
|
set -U __done_kitty_remote_control_password "kitty-notification-password-fish"
|
||||||
set -U __done_notification_command "${pkgs.libnotify}/bin/notify-send --icon=kitty --app-name=kitty \$title \$argv[1]"
|
set -U __done_notification_command "${pkgs.libnotify}/bin/notify-send --icon=kitty --app-name=kitty \$title \$argv[1]"
|
||||||
'';
|
'';
|
||||||
};
|
interactiveShellInit = ''
|
||||||
|
function last_file_in_downloads
|
||||||
|
echo "\"$(find ~/Downloads -type f -printf "%C@:%p\n" -not -regex ".*Downloads/torrent_incomplete/.*" -not -regex ".*Downloads/torrent/.*" | sort -rn | head -n 1 | cut -d ':' -f2-)\""
|
||||||
|
end
|
||||||
|
|
||||||
#programs.neovim = {
|
abbr -a --position anywhere lfd --function last_file_in_downloads
|
||||||
# enable = true;
|
|
||||||
# defaultEditor = true;
|
function copy_clipboard
|
||||||
# configure = {
|
echo '| wl-copy'
|
||||||
# customRC = ''
|
end
|
||||||
# :set mouse=a
|
|
||||||
# '';
|
abbr -a --position anywhere CC --function copy_clipboard
|
||||||
# };
|
'';
|
||||||
#};
|
};
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
120
apps/overrides.nix
Normal file
120
apps/overrides.nix
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
{ pkgs, lib, inputs, stable, unstable, self, ... }:
|
||||||
|
let
|
||||||
|
vesktopDesktopItem = pkgs.makeDesktopItem {
|
||||||
|
name = "vesktop";
|
||||||
|
desktopName = "Discord";
|
||||||
|
exec = "vesktop %U";
|
||||||
|
icon = "discord";
|
||||||
|
startupWMClass = "Vesktop";
|
||||||
|
genericName = "Internet Messenger";
|
||||||
|
keywords = [ "discord" "vencord" "electron" "chat" ];
|
||||||
|
categories = [ "Network" "InstantMessaging" "Chat" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
diosevka = unstable.iosevka.override {
|
||||||
|
privateBuildPlan = ''
|
||||||
|
[buildPlans.IosevkaDiosevka]
|
||||||
|
family = "Iosevka Diosevka"
|
||||||
|
spacing = "quasi-proportional"
|
||||||
|
serifs = "sans"
|
||||||
|
noCvSs = true
|
||||||
|
exportGlyphNames = true
|
||||||
|
|
||||||
|
[buildPlans.IosevkaDiosevka.variants.design]
|
||||||
|
capital-i = "short-serifed"
|
||||||
|
capital-l = "serifless"
|
||||||
|
capital-m = "hanging-serifless"
|
||||||
|
capital-q = "crossing"
|
||||||
|
capital-v = "straight-serifless"
|
||||||
|
capital-w = "straight-serifless"
|
||||||
|
e = "flat-crossbar"
|
||||||
|
f = "flat-hook-serifless"
|
||||||
|
i = "hooky"
|
||||||
|
j = "flat-hook-serifless"
|
||||||
|
l = "flat-tailed"
|
||||||
|
r = "serifless"
|
||||||
|
t = "flat-hook"
|
||||||
|
w = "straight-flat-top-serifless"
|
||||||
|
long-s = "flat-hook-tailed-middle-serifed"
|
||||||
|
eszet = "longs-s-lig-bottom-serifed"
|
||||||
|
capital-delta = "straight"
|
||||||
|
lower-iota = "serifed-flat-tailed"
|
||||||
|
lower-tau = "flat-tailed"
|
||||||
|
cyrl-el = "straight"
|
||||||
|
cyrl-em = "hanging-serifless"
|
||||||
|
cyrl-en = "serifless"
|
||||||
|
one = "no-base"
|
||||||
|
two = "straight-neck-serifless"
|
||||||
|
four = "semi-open-serifless"
|
||||||
|
nine = "straight-bar"
|
||||||
|
tilde = "low"
|
||||||
|
asterisk = "penta-low"
|
||||||
|
ascii-single-quote = "straight"
|
||||||
|
paren = "flat-arc"
|
||||||
|
brace = "curly"
|
||||||
|
at = "compact"
|
||||||
|
dollar = "interrupted"
|
||||||
|
cent = "bar-interrupted"
|
||||||
|
percent = "rings-continuous-slash"
|
||||||
|
lig-equal-chain = "with-notch"
|
||||||
|
|
||||||
|
[buildPlans.IosevkaDiosevka.variants.italic]
|
||||||
|
f = "flat-hook-tailed"
|
||||||
|
i = "serifed-flat-tailed"
|
||||||
|
l = "serifed-flat-tailed"
|
||||||
|
w = "straight-flat-top-motion-serifed"
|
||||||
|
long-s = "flat-hook-tailed"
|
||||||
|
eszet = "longs-s-lig-tailed-serifless"
|
||||||
|
|
||||||
|
[buildPlans.IosevkaDiosevka.weights.Regular]
|
||||||
|
shape = 400
|
||||||
|
menu = 400
|
||||||
|
css = 400
|
||||||
|
|
||||||
|
[buildPlans.IosevkaDiosevka.weights.Bold]
|
||||||
|
shape = 700
|
||||||
|
menu = 700
|
||||||
|
css = 700
|
||||||
|
|
||||||
|
[buildPlans.IosevkaDiosevka.widths.Normal]
|
||||||
|
shape = 500
|
||||||
|
menu = 5
|
||||||
|
css = "normal"
|
||||||
|
'';
|
||||||
|
set = "Diosevka";
|
||||||
|
};
|
||||||
|
|
||||||
|
# iosevka-comfy = pkgs.iosevka.overrideAttrs rec {
|
||||||
|
# privateBuildPlan = builtins.readFile ./iosevka-comfy.toml;
|
||||||
|
# set = "comfy-duo";
|
||||||
|
# };
|
||||||
|
|
||||||
|
vesktop = (pkgs.symlinkJoin {
|
||||||
|
name = "vesktop";
|
||||||
|
paths = [ (unstable.vesktop.override {
|
||||||
|
electron = unstable.electron;
|
||||||
|
vencord = unstable.vencord.overrideAttrs rec {
|
||||||
|
version = "unstable-0bebc85";
|
||||||
|
gitHash = "0bebc85";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Vendicated";
|
||||||
|
repo = "Vencord";
|
||||||
|
rev = "0bebc85";
|
||||||
|
hash = "sha256-Td+Juf7OhyNilowwKQL4Gw/HrVpzAwNzLR5Vi6S5Bys=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}) ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
mkdir -p $out/share/applications
|
||||||
|
ln -sf ${vesktopDesktopItem}/share/applications/* $out/share/applications
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
input-font = pkgs.callPackage ../derivations/input-font.nix { url = inputs.secrets.home.input-font.domain; };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
{ lib, pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation rec {
|
|
||||||
name = "audio-relay";
|
|
||||||
version = "0.26.3";
|
|
||||||
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
url = "https://dl.audiorelay.net/setups/linux/audiorelay-0.26.3.tar.gz";
|
|
||||||
sha256 = "sha256:05553s1gp9bimr79nvagdk0l8ahmbwkqg6i6csavvzw40kisj49r";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
autoPatchelfHook
|
|
||||||
makeWrapper
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
jdk
|
|
||||||
alsaLib
|
|
||||||
file
|
|
||||||
fontconfig.lib
|
|
||||||
freetype
|
|
||||||
libglvnd
|
|
||||||
libpulseaudio
|
|
||||||
stdenv.cc.cc.lib
|
|
||||||
xorg.libX11
|
|
||||||
xorg.libXext
|
|
||||||
xorg.libXi
|
|
||||||
xorg.libXrender
|
|
||||||
xorg.libXtst
|
|
||||||
xorg.libXrandr
|
|
||||||
xorg.libXinerama
|
|
||||||
zlib
|
|
||||||
];
|
|
||||||
|
|
||||||
dontAutoPatchelf = true;
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
autoPatchelf \
|
|
||||||
$out/bin \
|
|
||||||
$out/lib/runtime/lib/jexec \
|
|
||||||
$out/lib/runtime/lib/jspawnhelper \
|
|
||||||
#$(find "$out/lib/runtime/lib" -type f -name 'lib*.so' -a -not -name 'libj*.so')
|
|
||||||
wrapProgram $out/bin/AudioRelay \
|
|
||||||
--prefix LD_LIBRARY_PATH : $out/lib/runtime/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.alsaLib}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.fontconfig.lib}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.freetype}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.libglvnd}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.libpulseaudio}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.stdenv.cc.cc.lib}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.xorg.libX11}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.xorg.libXext}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.xorg.libXi}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.xorg.libXrender}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.xorg.libXtst}/lib/ \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${pkgs.zlib}/lib/
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/icons/hicolor/512x512/apps
|
|
||||||
ln -sf AudioRelay bin/audio-relay
|
|
||||||
cp -rp bin lib $out/
|
|
||||||
cp lib/AudioRelay.png $out/share/icons/hicolor/512x512/apps/audiorelay.png
|
|
||||||
cp -r ${desktopItem}/share/applications $out/share
|
|
||||||
cp $out/lib/app/AudioRelay.cfg $out/lib/app/.AudioRelay-wrapped.cfg
|
|
||||||
'';
|
|
||||||
|
|
||||||
desktopItem = pkgs.makeDesktopItem {
|
|
||||||
name = "AudioRelay";
|
|
||||||
exec = "audio-relay";
|
|
||||||
genericName = "AudioRelay audio bridge";
|
|
||||||
comment = "AudioRelay sound server/player";
|
|
||||||
categories = [ "Network" "Audio" ];
|
|
||||||
desktopName = "AudioRelay";
|
|
||||||
mimeTypes = [];
|
|
||||||
icon = "audiorelay";
|
|
||||||
};
|
|
||||||
|
|
||||||
sourceRoot = ".";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "An application to stream audio between devices";
|
|
||||||
homepage = "https://audiorelay.net";
|
|
||||||
license = licenses.unfree;
|
|
||||||
# platforms = platforms.x86_64-linux;
|
|
||||||
maintainers = with maintainers; [];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
98
derivations/input-font.nix
Normal file
98
derivations/input-font.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchzip
|
||||||
|
, python3
|
||||||
|
, config
|
||||||
|
, acceptLicense ? config.input-fonts.acceptLicense or false
|
||||||
|
, url ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
throwLicense = throw ''
|
||||||
|
Input is available free of charge for private/unpublished usage. This includes things like your personal coding app or for composing plain text documents.
|
||||||
|
To use it, you need to agree to its license: https://input.djr.com/license/
|
||||||
|
|
||||||
|
You can express acceptance by setting acceptLicense to true in your
|
||||||
|
configuration. Note that this is not a free license so it requires allowing
|
||||||
|
unfree licenses.
|
||||||
|
|
||||||
|
configuration.nix:
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.config.input-fonts.acceptLicense = true;
|
||||||
|
|
||||||
|
config.nix:
|
||||||
|
allowUnfree = true;
|
||||||
|
input-fonts.acceptLicense = true;
|
||||||
|
|
||||||
|
If you would like to support this project, consider purchasing a license at <http://input.djr.com/buy>.
|
||||||
|
'';
|
||||||
|
|
||||||
|
releaseDate = "2015-06-24";
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "input-fonts";
|
||||||
|
version = "1.2";
|
||||||
|
|
||||||
|
src =
|
||||||
|
fetchzip {
|
||||||
|
name = "input-fonts-${version}";
|
||||||
|
# Add .zip parameter so that zip unpackCmd can match it.
|
||||||
|
# url = "https://input.djr.com/build/?fontSelection=fourStyleFamily®ular=InputSansNarrow-Light&italic=InputSansNarrow-LightItalic&bold=InputSansNarrow-Medium&boldItalic=InputSansNarrow-MediumItalic&a=0&g=0&i=topserif&l=0&zero=slash&asterisk=height&braces=straight&preset=default&line-height=1.1&accept=I+do&email=";
|
||||||
|
url = "${url}"; #i had to shorten link bc otherwise got errors that it's too long
|
||||||
|
sha256 = "sha256-tYC/yDaHz2AD5PpikTHewneZNaF3O0fClhhJvjeKdAY=";
|
||||||
|
stripRoot = false;
|
||||||
|
|
||||||
|
postFetch = ''
|
||||||
|
# Reset the timestamp to release date for determinism.
|
||||||
|
PATH=${lib.makeBinPath [ python3.pkgs.fonttools ]}:$PATH
|
||||||
|
for ttf_file in $out/Input_Fonts/*/*/*.ttf; do
|
||||||
|
ttx_file=$(dirname "$ttf_file")/$(basename "$ttf_file" .ttf).ttx
|
||||||
|
ttx "$ttf_file"
|
||||||
|
rm "$ttf_file"
|
||||||
|
touch -m -t ${builtins.replaceStrings [ "-" ] [ "" ] releaseDate}0000 "$ttx_file"
|
||||||
|
ttx --recalc-timestamp "$ttx_file"
|
||||||
|
rm "$ttx_file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/share/fonts/truetype
|
||||||
|
find Input_Fonts -name "*.ttf" -exec cp -a {} "$out"/share/fonts/truetype/ \;
|
||||||
|
mkdir -p "$out"/share/doc
|
||||||
|
cp -a *.txt "$out"/share/doc/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Fonts for Code, from Font Bureau";
|
||||||
|
longDescription = ''
|
||||||
|
Input is a font family designed for computer programming, data,
|
||||||
|
and text composition. It was designed by David Jonathan Ross
|
||||||
|
between 2012 and 2014 and published by The Font Bureau. It
|
||||||
|
contains a wide array of styles so you can fine-tune the
|
||||||
|
typography that works best in your editing environment.
|
||||||
|
|
||||||
|
Input Mono is a monospaced typeface, where all characters occupy
|
||||||
|
a fixed width. Input Sans and Serif are proportional typefaces
|
||||||
|
that are designed with all of the features of a good monospace —
|
||||||
|
generous spacing, large punctuation, and easily distinguishable
|
||||||
|
characters — but without the limitations of a fixed width.
|
||||||
|
'';
|
||||||
|
homepage = "https://input.djr.com/";
|
||||||
|
license = licenses.unfree;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
romildo
|
||||||
|
];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
{ spotify, stdenv, rustPlatform, fetchFromGitHub, xorg, pkgs }:
|
|
||||||
let
|
|
||||||
spotify-adblock = rustPlatform.buildRustPackage {
|
|
||||||
pname = "spotify-adblock";
|
|
||||||
version = "1.0.3";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "abba23";
|
|
||||||
repo = "spotify-adblock";
|
|
||||||
rev = "5a3281dee9f889afdeea7263558e7a715dcf5aab";
|
|
||||||
hash = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE=";
|
|
||||||
};
|
|
||||||
cargoSha256 = "sha256-wPV+ZY34OMbBrjmhvwjljbwmcUiPdWNHFU3ac7aVbIQ=";
|
|
||||||
|
|
||||||
patchPhase = ''
|
|
||||||
substituteInPlace src/lib.rs \
|
|
||||||
--replace 'config.toml' $out/etc/spotify-adblock/config.toml
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
make
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/etc/spotify-adblock
|
|
||||||
install -D --mode=644 config.toml $out/etc/spotify-adblock
|
|
||||||
mkdir -p $out/lib
|
|
||||||
install -D --mode=644 --strip target/release/libspotifyadblock.so $out/lib
|
|
||||||
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
spotifywm = stdenv.mkDerivation {
|
|
||||||
name = "spotifywm";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "dasj";
|
|
||||||
repo = "spotifywm";
|
|
||||||
rev = "8624f539549973c124ed18753881045968881745";
|
|
||||||
hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
|
|
||||||
};
|
|
||||||
buildInputs = [ xorg.libX11 ];
|
|
||||||
installPhase = "mv spotifywm.so $out";
|
|
||||||
};
|
|
||||||
in spotify.overrideAttrs (old: {
|
|
||||||
postInstall = (old.postInstall or "") + ''
|
|
||||||
mkdir spotify-xpui
|
|
||||||
mv $out/share/spotify/Apps/xpui.spa .
|
|
||||||
${pkgs.unzip}/bin/unzip -qq xpui.spa -d spotify-xpui/
|
|
||||||
|
|
||||||
cd spotify-xpui/
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's|adsEnabled:!0|adsEnabled:!1|' xpui.js
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's|allSponsorships||' xpui.js
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's/(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===/$1"premium"===$2$3"free"===/g' xpui.js
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's/(case .:|async enable\(.\)\{)(this.enabled=.+?\(.{1,3},"audio"\),|return this.enabled=...+?\(.{1,3},"audio"\))((;case 4:)?this.subscription=this.audioApi).+?this.onAdMessage\)/$1$3.cosmosConnector.increaseStreamTime(-100000000000)/' xpui.js
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's|(Enables quicksilver in-app messaging modal",default:)(!0)|$1false|' xpui.js
|
|
||||||
${pkgs.perl}/bin/perl -pi -w -e 's/(\.WiPggcPDzbwGxoxwLWFf\s*{)/$1 height: 0;/;' home-hpto.css
|
|
||||||
|
|
||||||
${pkgs.zip}/bin/zip -qq -r xpui.spa .
|
|
||||||
mv xpui.spa $out/share/spotify/Apps/xpui.spa
|
|
||||||
cd ..
|
|
||||||
rm xpui.spa
|
|
||||||
|
|
||||||
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
|
|
||||||
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
|
|
||||||
wrapProgram $out/bin/spotify \
|
|
||||||
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
Loading…
Reference in a new issue