new git alias: git forgor 💀

This commit is contained in:
Max Headroom 2022-07-31 15:11:14 +02:00
parent 11a62ca55f
commit d00100f0ba
3 changed files with 50 additions and 4 deletions

View file

@ -479,11 +479,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1657224639, "lastModified": 1659087099,
"narHash": "sha256-KMu+GjI7wNZVtRbGmIWTwqlZK6ygYieH7uIG0OTtMUc=", "narHash": "sha256-VxWbaH8WjRp5VKUawO562rDkcknGknCR3ws6k7P9Sqw=",
"owner": "max-privatevoid", "owner": "max-privatevoid",
"repo": "nixpak", "repo": "nixpak",
"rev": "3c49e84cd5e4c8141ee7bf9a826a7e70761e9b43", "rev": "0d065d847bad75dfa2d055009bb2f07a85c47350",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +1,44 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let
locales = pkgs.glibcLocales.override {
allLocales = true;
};
fonts = with pkgs; [
cantarell-fonts
dejavu_fonts
liberation_ttf
gyre-fonts
source-sans
source-code-pro
];
fontCache = pkgs.makeFontsCache {
inherit (pkgs) fontconfig;
fontDirectories = fonts;
};
fontConfigFile = pkgs.writeTextDir "etc/fonts/conf.d/00-nixpak-fonts.conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
<fontconfig>
<!-- Font directories -->
${lib.concatStringsSep "\n" (map (font: "<dir>${font}</dir>") fonts)}
${lib.optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
<!-- Pre-generated font caches -->
<cachedir>${fontCache}</cachedir>
''}
</fontconfig>
'';
fc = pkgs.buildEnv {
name = "nixpak-font-env";
paths = [
fontConfigFile
pkgs.fontconfig.out
];
pathsToLink = "/etc/fonts";
};
in
{ {
config = { config = {
dbus.policies = { dbus.policies = {
@ -12,6 +51,7 @@
"org.a11y.Bus" = "talk"; "org.a11y.Bus" = "talk";
}; };
gpu.enable = lib.mkDefault true; gpu.enable = lib.mkDefault true;
gpu.provider = "bundle";
bubblewrap = { bubblewrap = {
network = lib.mkDefault false; network = lib.mkDefault false;
bind.rw = [ bind.rw = [
@ -23,7 +63,7 @@
"$XDG_RUNTIME_DIR/pulse" "$XDG_RUNTIME_DIR/pulse"
]; ];
bind.ro = [ bind.ro = [
"/etc/fonts" [ "${fc}/etc/fonts" "/etc/fonts" ]
"$XDG_RUNTIME_DIR/doc" "$XDG_RUNTIME_DIR/doc"
"$HOME/.config/gtk-2.0" "$HOME/.config/gtk-2.0"
"$HOME/.config/gtk-3.0" "$HOME/.config/gtk-3.0"
@ -34,6 +74,11 @@
pkgs.gnome.adwaita-icon-theme pkgs.gnome.adwaita-icon-theme
pkgs.shared-mime-info pkgs.shared-mime-info
]; ];
XCURSOR_PATH = lib.concatStringsSep ":" [
"${pkgs.gnome.adwaita-icon-theme}/share/icons"
"${pkgs.gnome.adwaita-icon-theme}/share/pixmaps"
];
LOCALE_ARCHIVE = "${locales}/lib/locale/locale-archive";
}; };
}; };
}; };

View file

@ -11,6 +11,7 @@
ac = "!git add . && git commit"; ac = "!git add . && git commit";
dump = "!cd ~/Projects/dump && git clone --depth=1"; dump = "!cd ~/Projects/dump && git clone --depth=1";
drop = "!EDITOR='${pkgs.gnused}/bin/sed -i s/^pick/drop/g' git rebase -i"; drop = "!EDITOR='${pkgs.gnused}/bin/sed -i s/^pick/drop/g' git rebase -i";
forgor = "commit --amend --no-edit";
grab = "clone --depth=1"; grab = "clone --depth=1";
graph = "log --all --decorate --graph --oneline"; graph = "log --all --decorate --graph --oneline";
gud = ac; gud = ac;