Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
htran | 0208a946f2 | |
htran | c2b5908fa5 | |
htran | 83c2b01570 | |
htran | ab8e04f3a0 | |
htran | eb91f32d53 | |
htran | 0dd6558770 | |
htran | f04fea60d2 | |
htran | 024e8530d0 |
23
.envrc
23
.envrc
|
@ -1,16 +1,13 @@
|
|||
#! /bin/sh
|
||||
#!/bin/sh
|
||||
|
||||
source "$(
|
||||
nix eval \
|
||||
--no-update-lock-file \
|
||||
--no-write-lock-file \
|
||||
--no-warn-dirty \
|
||||
--accept-flake-config \
|
||||
.#__std.direnv_lib 2>/dev/null \
|
||||
|| nix eval .#__std.direnv_lib # show the errors
|
||||
)"
|
||||
# FIXME: This should check if $USER is in userShells, if not,
|
||||
# fall back to `use nix`
|
||||
use std nix "//repo/userShells:${USER}"
|
||||
# first time
|
||||
if [[ ! -d $(nix store add-path --name source --dry-run .) ]]; then
|
||||
nix store add-path --name source .
|
||||
(cd ./src/local && nix flake lock --update-input std)
|
||||
(cd ./src/tests && nix flake lock --update-input std)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "$(fetchurl "https://raw.githubusercontent.com/paisano-nix/direnv/main/lib" "sha256-R3K8Flvbovj4IOvdlWNtQKLMMSQV464WjG9eU29ixHk=")"
|
||||
|
||||
use envreload "//repo/userShells/${USER}" //repo/userShells/default //repo/userShells
|
||||
|
|
15
README.md
15
README.md
|
@ -53,6 +53,9 @@ via writing and typing.
|
|||
I am in the process of moving away from Obsidian so that I can write ZK notes
|
||||
text-editor agnostically.
|
||||
|
||||
#### mickael-menu/zk
|
||||
|
||||
|
||||
- Config file: `zk/config.toml`
|
||||
- Command: `ln [-s] $PWD/zk/config.toml ~/.config/zk/config.toml`
|
||||
|
||||
|
@ -62,6 +65,18 @@ text-editor agnostically.
|
|||
Note (2023-06-07): I'm now using a mix of nvim-zk with Notion. I'm still figuring out
|
||||
a centralize place to put my notes and use it to do some knowledge graph magic
|
||||
|
||||
NOTE (2023-06-18): I used `mickael-menu/zk` for some time, but have found myself
|
||||
resort to notion due to the need for easier linking (just copy-paste onto
|
||||
selected note) where as I need to:
|
||||
|
||||
- `cS]` to encapsulate the selection with `[]`, then do `(<C-v>`. Too many keystrokes.
|
||||
|
||||
On retrospect, I could probably remap this workflow to `<LocalLeader>el"`:
|
||||
|
||||
Though, I want to just develop my own solution with
|
||||
[`nucliadb`](https://github.com/nuclia/nucliadb) and
|
||||
[`h2ogpt`](https://github.com/h2oai/h2ogpt)
|
||||
|
||||
## Troubleshoots
|
||||
|
||||
### My MacOS just updated, `nix` is no-longer here
|
||||
|
|
797
flake.lock
797
flake.lock
File diff suppressed because it is too large
Load Diff
26
flake.nix
26
flake.nix
|
@ -8,8 +8,11 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-latest.url = "github:nixos/nixpkgs";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
std.url = "github:divnix/std";
|
||||
# deploy-rs.url = "github:serokell/deploy-rs";
|
||||
std = {
|
||||
url = "github:divnix/std";
|
||||
inputs.devshell.url = "github:numtide/devshell";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -17,6 +20,8 @@
|
|||
neovim-nightly-overlay = {
|
||||
# need to pin this until darwin build is successful again.
|
||||
url = "github:nix-community/neovim-nightly-overlay?rev=88a6c749a7d126c49f3374f9f28ca452ea9419b8";
|
||||
# url = "github:nix-community/neovim-nightly-overlay";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-boost = {
|
||||
|
@ -31,16 +36,23 @@
|
|||
# Should show the latest nixpkgs whenever possible
|
||||
inputs.nixpkgs.follows = "nixpkgs-latest";
|
||||
};
|
||||
sg-nvim = {
|
||||
url = "git+https://github.com/pegasust/sg.nvim?ref=sg-cody-discover";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {self, std, ...} @ inputs:
|
||||
outputs = {
|
||||
self,
|
||||
std,
|
||||
...
|
||||
} @ inputs:
|
||||
std.growOn
|
||||
{
|
||||
# boilerplate
|
||||
inherit inputs;
|
||||
# All cell blocks are under ./nix/cells/<cell>/<cellblock> as `<cellblock>.nix`
|
||||
# All cell blocks are under ./nix/<cell>/<cellblock> as `<cellblock>.nix`
|
||||
# or `<cellblock/default.nix`
|
||||
cellsFrom = ./nix/cells;
|
||||
cellsFrom = ./nix;
|
||||
# modules = ./nix/modules;
|
||||
|
||||
cellBlocks = let
|
||||
|
@ -50,15 +62,13 @@
|
|||
(devshells "userShells")
|
||||
(functions "home-profiles")
|
||||
(functions "home-modules")
|
||||
(anything "home-configs")
|
||||
(anything "home-configs")
|
||||
(installables "packages")
|
||||
(anything "lib")
|
||||
];
|
||||
}
|
||||
{
|
||||
devShells = std.harvest self [["dotfiles" "devshells"]];
|
||||
# nixosConfigurations = std.pick [ [ "dotfiles" "nixos" ] ];
|
||||
# homeConfigurations = std.pick [ [ "dotfiles" "home" ] ];
|
||||
homeModules = std.pick self [["repo" "home-modules"]];
|
||||
packages = std.harvest self [["repo" "packages"]];
|
||||
legacyPackages = std.harvest self [["repo" "home-configs"]];
|
||||
|
|
|
@ -15,99 +15,99 @@
|
|||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
#env:
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
#TERM: alacritty
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
#TERM: alacritty
|
||||
|
||||
#window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
|
||||
# must be non-zero for this to take effect. The number of columns must be at
|
||||
# least `2`, while using a value of `0` for columns and lines will fall back
|
||||
# to the window manager's recommended size
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
|
||||
# must be non-zero for this to take effect. The number of columns must be at
|
||||
# least `2`, while using a value of `0` for columns and lines will fall back
|
||||
# to the window manager's recommended size
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
#padding:
|
||||
# x: 0
|
||||
# y: 0
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
#padding:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||
#decorations: full
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||
#decorations: full
|
||||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
#opacity: 1.0
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
#opacity: 1.0
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
#startup_mode: Windowed
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
#startup_mode: Windowed
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
|
||||
# Window class (Linux/BSD only):
|
||||
#class:
|
||||
# Application instance name
|
||||
#instance: Alacritty
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
# Window class (Linux/BSD only):
|
||||
#class:
|
||||
# Application instance name
|
||||
#instance: Alacritty
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
|
||||
# Decorations theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme/Wayland client side decorations.
|
||||
# Commonly supported values are `dark` and `light`. Set this to `None` to use
|
||||
# the default theme variant.
|
||||
#decorations_theme_variant: None
|
||||
# Decorations theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme/Wayland client side decorations.
|
||||
# Commonly supported values are `dark` and `light`. Set this to `None` to use
|
||||
# the default theme variant.
|
||||
#decorations_theme_variant: None
|
||||
|
||||
#scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
#history: 10000
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
#history: 10000
|
||||
|
||||
# Scrolling distance multiplier.
|
||||
#multiplier: 3
|
||||
# Scrolling distance multiplier.
|
||||
#multiplier: 3
|
||||
|
||||
# Font configuration
|
||||
font:
|
||||
|
@ -120,12 +120,11 @@ font:
|
|||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: DroidSansMono NF
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Font family
|
||||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
|
@ -135,8 +134,8 @@ font:
|
|||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold
|
||||
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Font family
|
||||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
|
@ -146,8 +145,8 @@ font:
|
|||
# The `style` can be specified to pick a specific face.
|
||||
#style: Italic
|
||||
|
||||
# Bold italic font face
|
||||
#bold_italic:
|
||||
# Bold italic font face
|
||||
#bold_italic:
|
||||
# Font family
|
||||
#
|
||||
# If the bold italic family is not specified, it will fall back to the
|
||||
|
@ -157,9 +156,8 @@ font:
|
|||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
# Point size
|
||||
size: 7.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
# spacing.
|
||||
|
@ -181,24 +179,24 @@ font:
|
|||
#
|
||||
#builtin_box_drawing: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
|
||||
# Colors (Tomorrow Night)
|
||||
#colors:
|
||||
# Colors (Tomorrow Night)
|
||||
#colors:
|
||||
# Default colors
|
||||
#primary:
|
||||
# background: '#1d1f21'
|
||||
# foreground: '#c5c8c6'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not
|
||||
# present. If the bright foreground color is not set, or
|
||||
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
||||
# color will be used.
|
||||
#dim_foreground: '#828482'
|
||||
#bright_foreground: '#eaeaea'
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not
|
||||
# present. If the bright foreground color is not set, or
|
||||
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
||||
# color will be used.
|
||||
#dim_foreground: '#828482'
|
||||
#bright_foreground: '#eaeaea'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
|
@ -224,32 +222,32 @@ font:
|
|||
#
|
||||
# Colors used for the search bar and match highlighting.
|
||||
#search:
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#matches:
|
||||
# foreground: '#000000'
|
||||
# background: '#ffffff'
|
||||
#focused_match:
|
||||
# foreground: '#ffffff'
|
||||
# background: '#000000'
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#matches:
|
||||
# foreground: '#000000'
|
||||
# background: '#ffffff'
|
||||
#focused_match:
|
||||
# foreground: '#ffffff'
|
||||
# background: '#000000'
|
||||
|
||||
# Keyboard hints
|
||||
#hints:
|
||||
# First character in the hint label
|
||||
#
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#start:
|
||||
# foreground: '#1d1f21'
|
||||
# background: '#e9ff5e'
|
||||
# First character in the hint label
|
||||
#
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#start:
|
||||
# foreground: '#1d1f21'
|
||||
# background: '#e9ff5e'
|
||||
|
||||
# All characters after the first one in the hint label
|
||||
#
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#end:
|
||||
# foreground: '#e9ff5e'
|
||||
# background: '#1d1f21'
|
||||
# All characters after the first one in the hint label
|
||||
#
|
||||
# Allowed values are CellForeground/CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#end:
|
||||
# foreground: '#e9ff5e'
|
||||
# background: '#1d1f21'
|
||||
|
||||
# Line indicator
|
||||
#
|
||||
|
@ -333,10 +331,10 @@ font:
|
|||
# regardless of their background color.
|
||||
#transparent_background_colors: false
|
||||
|
||||
# Bell
|
||||
#
|
||||
# The bell is rung every time the BEL control character is received.
|
||||
#bell:
|
||||
# Bell
|
||||
#
|
||||
# The bell is rung every time the BEL control character is received.
|
||||
#bell:
|
||||
# Visual Bell Animation
|
||||
#
|
||||
# Animation effect for flashing the screen when the visual bell is rung.
|
||||
|
@ -374,7 +372,7 @@ font:
|
|||
#
|
||||
#command: None
|
||||
|
||||
#selection:
|
||||
#selection:
|
||||
# This string contains all characters that are used as separators for
|
||||
# "semantic words" in Alacritty.
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
|
@ -382,25 +380,25 @@ font:
|
|||
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||
#save_to_clipboard: false
|
||||
|
||||
#cursor:
|
||||
#cursor:
|
||||
# Cursor style
|
||||
#style:
|
||||
# Cursor shape
|
||||
#
|
||||
# Values for `shape`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#shape: Block
|
||||
# Cursor shape
|
||||
#
|
||||
# Values for `shape`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#shape: Block
|
||||
|
||||
# Cursor blinking state
|
||||
#
|
||||
# Values for `blinking`:
|
||||
# - Never: Prevent the cursor from ever blinking
|
||||
# - Off: Disable blinking by default
|
||||
# - On: Enable blinking by default
|
||||
# - Always: Force the cursor to always blink
|
||||
#blinking: Off
|
||||
# Cursor blinking state
|
||||
#
|
||||
# Values for `blinking`:
|
||||
# - Never: Prevent the cursor from ever blinking
|
||||
# - Off: Disable blinking by default
|
||||
# - On: Enable blinking by default
|
||||
# - Always: Force the cursor to always blink
|
||||
#blinking: Off
|
||||
|
||||
# Vi mode cursor style
|
||||
#
|
||||
|
@ -426,36 +424,36 @@ font:
|
|||
# from `0.0` to `1.0`.
|
||||
#thickness: 0.15
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
#live_config_reload: true
|
||||
# Live config reload (changes require restart)
|
||||
#live_config_reload: true
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||
# shell.
|
||||
#
|
||||
# Default:
|
||||
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
|
||||
# - (Windows) powershell
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||
# shell.
|
||||
#
|
||||
# Default:
|
||||
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
|
||||
# - (Windows) powershell
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
# Offer IPC using `alacritty msg` (unix only)
|
||||
# ipc_socket: true
|
||||
# Offer IPC using `alacritty msg` (unix only)
|
||||
# ipc_socket: true
|
||||
|
||||
#mouse:
|
||||
#mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
|
@ -467,11 +465,11 @@ font:
|
|||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
#hide_when_typing: false
|
||||
|
||||
# Hints
|
||||
#
|
||||
# Terminal hints can be used to find text or hyperlink in the visible part of
|
||||
# the terminal and pipe it to other applications.
|
||||
#hints:
|
||||
# Hints
|
||||
#
|
||||
# Terminal hints can be used to find text or hyperlink in the visible part of
|
||||
# the terminal and pipe it to other applications.
|
||||
#hints:
|
||||
# Keys used for the hint labels.
|
||||
#alphabet: "jfkdls;ahgurieowpq"
|
||||
|
||||
|
@ -517,247 +515,247 @@ font:
|
|||
# key: U
|
||||
# mods: Control|Shift
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty
|
||||
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||
# requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
# - `mouse`:
|
||||
#
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# - `action` (see key bindings for actions not exclusive to mouse mode)
|
||||
#
|
||||
# - Mouse exclusive actions:
|
||||
#
|
||||
# - ExpandSelection
|
||||
# Expand the selection to the current mouse cursor location.
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods` (see key bindings)
|
||||
#mouse_bindings:
|
||||
# - { mouse: Right, action: ExpandSelection }
|
||||
# - { mouse: Right, mods: Control, action: ExpandSelection }
|
||||
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty
|
||||
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||
# requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
# - `mouse`:
|
||||
#
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# - `action` (see key bindings for actions not exclusive to mouse mode)
|
||||
#
|
||||
# - Mouse exclusive actions:
|
||||
#
|
||||
# - ExpandSelection
|
||||
# Expand the selection to the current mouse cursor location.
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods` (see key bindings)
|
||||
#mouse_bindings:
|
||||
# - { mouse: Right, action: ExpandSelection }
|
||||
# - { mouse: Right, mods: Control, action: ExpandSelection }
|
||||
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. For example, this is the
|
||||
# default paste binding:
|
||||
#
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Each key binding will specify a:
|
||||
#
|
||||
# - `key`: Identifier of the key pressed
|
||||
#
|
||||
# - A-Z
|
||||
# - F1-F24
|
||||
# - Key0-Key9
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number. This command will allow you to display the hex scancodes
|
||||
# for certain keys:
|
||||
#
|
||||
# `showkey --scancodes`.
|
||||
#
|
||||
# Then exactly one of:
|
||||
#
|
||||
# - `chars`: Send a byte sequence to the running application
|
||||
#
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences. To find escape codes for bindings
|
||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||
# to keys. It is therefore required to update the terminfo when changing an
|
||||
# escape sequence.
|
||||
#
|
||||
# - `action`: Execute a predefined action
|
||||
#
|
||||
# - ToggleViMode
|
||||
# - SearchForward
|
||||
# Start searching toward the right of the search origin.
|
||||
# - SearchBackward
|
||||
# Start searching toward the left of the search origin.
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollHalfPageUp
|
||||
# - ScrollHalfPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# Remove the terminal's scrollback history.
|
||||
# - Hide
|
||||
# Hide the Alacritty window.
|
||||
# - Minimize
|
||||
# Minimize the Alacritty window.
|
||||
# - Quit
|
||||
# Quit Alacritty.
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# Spawn a new instance of Alacritty.
|
||||
# - CreateNewWindow
|
||||
# Create a new Alacritty window from the current process.
|
||||
# - ClearLogNotice
|
||||
# Clear Alacritty's UI warning and error notice.
|
||||
# - ClearSelection
|
||||
# Remove the active selection.
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# - Vi mode exclusive actions:
|
||||
#
|
||||
# - Open
|
||||
# Perform the action of the first matching hint under the vi mode cursor
|
||||
# with `mouse.enabled` set to `true`.
|
||||
# - ToggleNormalSelection
|
||||
# - ToggleLineSelection
|
||||
# - ToggleBlockSelection
|
||||
# - ToggleSemanticSelection
|
||||
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||
# - CenterAroundViCursor
|
||||
# Center view around vi mode cursor
|
||||
#
|
||||
# - Vi mode exclusive cursor motion actions:
|
||||
#
|
||||
# - Up
|
||||
# One line up.
|
||||
# - Down
|
||||
# One line down.
|
||||
# - Left
|
||||
# One character left.
|
||||
# - Right
|
||||
# One character right.
|
||||
# - First
|
||||
# First column, or beginning of the line when already at the first column.
|
||||
# - Last
|
||||
# Last column, or beginning of the line when already at the last column.
|
||||
# - FirstOccupied
|
||||
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||
# the line when already at the first cell of the row.
|
||||
# - High
|
||||
# Top of the screen.
|
||||
# - Middle
|
||||
# Center of the screen.
|
||||
# - Low
|
||||
# Bottom of the screen.
|
||||
# - SemanticLeft
|
||||
# Start of the previous semantically separated word.
|
||||
# - SemanticRight
|
||||
# Start of the next semantically separated word.
|
||||
# - SemanticLeftEnd
|
||||
# End of the previous semantically separated word.
|
||||
# - SemanticRightEnd
|
||||
# End of the next semantically separated word.
|
||||
# - WordLeft
|
||||
# Start of the previous whitespace separated word.
|
||||
# - WordRight
|
||||
# Start of the next whitespace separated word.
|
||||
# - WordLeftEnd
|
||||
# End of the previous whitespace separated word.
|
||||
# - WordRightEnd
|
||||
# End of the next whitespace separated word.
|
||||
# - Bracket
|
||||
# Character matching the bracket at the cursor's location.
|
||||
# - SearchNext
|
||||
# Beginning of the next match.
|
||||
# - SearchPrevious
|
||||
# Beginning of the previous match.
|
||||
# - SearchStart
|
||||
# Start of the match to the left of the vi mode cursor.
|
||||
# - SearchEnd
|
||||
# End of the match to the right of the vi mode cursor.
|
||||
#
|
||||
# - Search mode exclusive actions:
|
||||
# - SearchFocusNext
|
||||
# Move the focus to the next search match.
|
||||
# - SearchFocusPrevious
|
||||
# Move the focus to the previous search match.
|
||||
# - SearchConfirm
|
||||
# - SearchCancel
|
||||
# - SearchClear
|
||||
# Reset the search regex.
|
||||
# - SearchDeleteWord
|
||||
# Delete the last word in the search regex.
|
||||
# - SearchHistoryPrevious
|
||||
# Go to the previous regex in the search history.
|
||||
# - SearchHistoryNext
|
||||
# Go to the next regex in the search history.
|
||||
#
|
||||
# - macOS exclusive actions:
|
||||
# - ToggleSimpleFullscreen
|
||||
# Enter fullscreen without occupying another space.
|
||||
#
|
||||
# - Linux/BSD exclusive actions:
|
||||
#
|
||||
# - CopySelection
|
||||
# Copy from the selection buffer.
|
||||
# - PasteSelection
|
||||
# Paste from the selection buffer.
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
# The `command` field must be a map containing a `program` string and an
|
||||
# `args` array of command line parameter strings. For example:
|
||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods`: Key modifiers to filter binding actions
|
||||
#
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this:
|
||||
# `mods: Control|Shift`.
|
||||
# Whitespace and capitalization are relevant and must match the example.
|
||||
#
|
||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||
#
|
||||
# This is mainly used to send applications the correct escape sequences
|
||||
# when in different modes.
|
||||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Search
|
||||
# - Alt
|
||||
# - Vi
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new
|
||||
# binding with the same triggers is defined. To unset a default binding, it can
|
||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||
# a no-op if you do not wish to receive input characters for that binding.
|
||||
#
|
||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# in the order they were defined in.
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. For example, this is the
|
||||
# default paste binding:
|
||||
#
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Each key binding will specify a:
|
||||
#
|
||||
# - `key`: Identifier of the key pressed
|
||||
#
|
||||
# - A-Z
|
||||
# - F1-F24
|
||||
# - Key0-Key9
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number. This command will allow you to display the hex scancodes
|
||||
# for certain keys:
|
||||
#
|
||||
# `showkey --scancodes`.
|
||||
#
|
||||
# Then exactly one of:
|
||||
#
|
||||
# - `chars`: Send a byte sequence to the running application
|
||||
#
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences. To find escape codes for bindings
|
||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||
# to keys. It is therefore required to update the terminfo when changing an
|
||||
# escape sequence.
|
||||
#
|
||||
# - `action`: Execute a predefined action
|
||||
#
|
||||
# - ToggleViMode
|
||||
# - SearchForward
|
||||
# Start searching toward the right of the search origin.
|
||||
# - SearchBackward
|
||||
# Start searching toward the left of the search origin.
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollHalfPageUp
|
||||
# - ScrollHalfPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# Remove the terminal's scrollback history.
|
||||
# - Hide
|
||||
# Hide the Alacritty window.
|
||||
# - Minimize
|
||||
# Minimize the Alacritty window.
|
||||
# - Quit
|
||||
# Quit Alacritty.
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# Spawn a new instance of Alacritty.
|
||||
# - CreateNewWindow
|
||||
# Create a new Alacritty window from the current process.
|
||||
# - ClearLogNotice
|
||||
# Clear Alacritty's UI warning and error notice.
|
||||
# - ClearSelection
|
||||
# Remove the active selection.
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# - Vi mode exclusive actions:
|
||||
#
|
||||
# - Open
|
||||
# Perform the action of the first matching hint under the vi mode cursor
|
||||
# with `mouse.enabled` set to `true`.
|
||||
# - ToggleNormalSelection
|
||||
# - ToggleLineSelection
|
||||
# - ToggleBlockSelection
|
||||
# - ToggleSemanticSelection
|
||||
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||
# - CenterAroundViCursor
|
||||
# Center view around vi mode cursor
|
||||
#
|
||||
# - Vi mode exclusive cursor motion actions:
|
||||
#
|
||||
# - Up
|
||||
# One line up.
|
||||
# - Down
|
||||
# One line down.
|
||||
# - Left
|
||||
# One character left.
|
||||
# - Right
|
||||
# One character right.
|
||||
# - First
|
||||
# First column, or beginning of the line when already at the first column.
|
||||
# - Last
|
||||
# Last column, or beginning of the line when already at the last column.
|
||||
# - FirstOccupied
|
||||
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||
# the line when already at the first cell of the row.
|
||||
# - High
|
||||
# Top of the screen.
|
||||
# - Middle
|
||||
# Center of the screen.
|
||||
# - Low
|
||||
# Bottom of the screen.
|
||||
# - SemanticLeft
|
||||
# Start of the previous semantically separated word.
|
||||
# - SemanticRight
|
||||
# Start of the next semantically separated word.
|
||||
# - SemanticLeftEnd
|
||||
# End of the previous semantically separated word.
|
||||
# - SemanticRightEnd
|
||||
# End of the next semantically separated word.
|
||||
# - WordLeft
|
||||
# Start of the previous whitespace separated word.
|
||||
# - WordRight
|
||||
# Start of the next whitespace separated word.
|
||||
# - WordLeftEnd
|
||||
# End of the previous whitespace separated word.
|
||||
# - WordRightEnd
|
||||
# End of the next whitespace separated word.
|
||||
# - Bracket
|
||||
# Character matching the bracket at the cursor's location.
|
||||
# - SearchNext
|
||||
# Beginning of the next match.
|
||||
# - SearchPrevious
|
||||
# Beginning of the previous match.
|
||||
# - SearchStart
|
||||
# Start of the match to the left of the vi mode cursor.
|
||||
# - SearchEnd
|
||||
# End of the match to the right of the vi mode cursor.
|
||||
#
|
||||
# - Search mode exclusive actions:
|
||||
# - SearchFocusNext
|
||||
# Move the focus to the next search match.
|
||||
# - SearchFocusPrevious
|
||||
# Move the focus to the previous search match.
|
||||
# - SearchConfirm
|
||||
# - SearchCancel
|
||||
# - SearchClear
|
||||
# Reset the search regex.
|
||||
# - SearchDeleteWord
|
||||
# Delete the last word in the search regex.
|
||||
# - SearchHistoryPrevious
|
||||
# Go to the previous regex in the search history.
|
||||
# - SearchHistoryNext
|
||||
# Go to the next regex in the search history.
|
||||
#
|
||||
# - macOS exclusive actions:
|
||||
# - ToggleSimpleFullscreen
|
||||
# Enter fullscreen without occupying another space.
|
||||
#
|
||||
# - Linux/BSD exclusive actions:
|
||||
#
|
||||
# - CopySelection
|
||||
# Copy from the selection buffer.
|
||||
# - PasteSelection
|
||||
# Paste from the selection buffer.
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
# The `command` field must be a map containing a `program` string and an
|
||||
# `args` array of command line parameter strings. For example:
|
||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods`: Key modifiers to filter binding actions
|
||||
#
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this:
|
||||
# `mods: Control|Shift`.
|
||||
# Whitespace and capitalization are relevant and must match the example.
|
||||
#
|
||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||
#
|
||||
# This is mainly used to send applications the correct escape sequences
|
||||
# when in different modes.
|
||||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Search
|
||||
# - Alt
|
||||
# - Vi
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new
|
||||
# binding with the same triggers is defined. To unset a default binding, it can
|
||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||
# a no-op if you do not wish to receive input characters for that binding.
|
||||
#
|
||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# in the order they were defined in.
|
||||
key_bindings:
|
||||
- { key: N, mods: Control, action: CreateNewWindow }
|
||||
# - { key: Paste, action: Paste }
|
||||
|
@ -771,7 +769,12 @@ key_bindings:
|
|||
|
||||
# Vi Mode
|
||||
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
||||
- { key: Escape, mods: Shift, mode: ~Search, action: ToggleViMode }
|
||||
- {
|
||||
key: Escape,
|
||||
mods: Shift,
|
||||
mode: ~Search,
|
||||
action: ToggleViMode
|
||||
}
|
||||
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
||||
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||
|
@ -834,9 +837,9 @@ key_bindings:
|
|||
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
||||
|
||||
# (Windows, Linux, and BSD only)
|
||||
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
||||
- { key: C, mods: Control|Shift, action: Copy }
|
||||
- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
||||
- { key: C, mods: Control|Shift, action: Copy }
|
||||
# - { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
|
||||
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
|
||||
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
|
||||
|
@ -866,11 +869,13 @@ key_bindings:
|
|||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
- { key: Return, mods: Command, action: ToggleFullscreen }
|
||||
# NOTE: Use Command + Control + F
|
||||
#
|
||||
# - { key: Return, mods: Command, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
|
||||
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
|
||||
|
||||
#debug:
|
||||
#debug:
|
||||
# Display the time it takes to redraw each frame.
|
||||
#render_timer: false
|
||||
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
# Font configuration
|
||||
font_family Hack Nerd Font Mono
|
||||
bold_font Hack Nerd Font Mono Bold
|
||||
italic_font Hack Nerd Font Mono Italic
|
||||
bold_italic_font Hack Nerd Font Mono Bold Italic
|
||||
font_size 11.0
|
||||
|
||||
sync_to_monitor no
|
||||
disable_ligatures never
|
||||
|
||||
# NO BELLS!
|
||||
enable_audio_bell no
|
||||
|
||||
# theme gruvbox_dark
|
||||
# include /themes/gruvbox_dark.conf
|
||||
|
||||
# window_margin_width 5.0
|
||||
# window_padding_width 5.0
|
||||
|
||||
# I'm on Prime's team here, blinking cursor is too distracting
|
||||
cursor_blink_interval 0
|
||||
|
||||
background #282c34
|
||||
dynamic_background_opacity true
|
||||
background_opacity 0.97
|
||||
macos_traditional_fullscreen no
|
||||
|
||||
# from nvim-nonicons
|
||||
# symbol_map U+f101-U+f208 nonicon regular
|
||||
|
||||
|
||||
# No creating windows
|
||||
map ctrl+shift+enter no_op
|
||||
map cmd+enter no_op
|
||||
|
||||
# I don't understand why some of these have remaps on MacOS
|
||||
map ctrl+shift+n no_op # new_os_window
|
||||
map cmd+n no_op # new_os_window
|
||||
|
||||
map ctrl+shift+w close_window
|
||||
map shft+cmd+d no_op # just disable any apple-linux segregation
|
||||
|
||||
# tabs
|
||||
|
||||
## Tab creation
|
||||
map ctrl+shift+t combine | new_tab | set_tab_title _
|
||||
map cmd+t no_op
|
||||
map ctrl+, set_tab_title _
|
||||
|
||||
## No tab destruction
|
||||
map ctrl+shift+q no_op
|
||||
map ctrl+shift+w no_op
|
||||
map cmd+w no_op # close_tab 🍎
|
||||
|
||||
## No tab iteration
|
||||
map ctrl+shift+right no_op # next_tab
|
||||
map shift+cmd+] no_op # next_tab 🍎
|
||||
map ctrl+tab no_op # next_tab
|
||||
|
||||
map ctrl+shift+left no_op # previous_tab
|
||||
map shift+cmd+[ no_op # previous_tab 🍎
|
||||
map ctrl+shift+tab no_op # previous_tab
|
||||
|
||||
map ctrl+shift+. no_op # move_tab_forward
|
||||
|
||||
|
||||
## Tab linear jumping
|
||||
map ctrl+1 goto_tab 1
|
||||
map ctrl+2 goto_tab 2
|
||||
map ctrl+3 goto_tab 3
|
||||
map ctrl+4 goto_tab 4
|
||||
map ctrl+5 goto_tab 5
|
||||
map ctrl+6 goto_tab 6
|
||||
map ctrl+7 goto_tab 7
|
||||
map ctrl+8 goto_tab 8
|
||||
map ctrl+9 goto_tab 9
|
||||
map ctrl+0 goto_tab 10
|
||||
|
||||
### A bit ergonomics for mac
|
||||
map cmd+1 goto_tab 1
|
||||
map cmd+2 goto_tab 2
|
||||
map cmd+3 goto_tab 3
|
||||
map cmd+4 goto_tab 4
|
||||
map cmd+5 goto_tab 5
|
||||
map cmd+6 goto_tab 6
|
||||
map cmd+7 goto_tab 7
|
||||
map cmd+8 goto_tab 8
|
||||
map cmd+9 goto_tab 9
|
||||
map cmd+0 goto_tab 10
|
||||
|
||||
## Just disable all iteration of tab - use linear mapping
|
||||
map ctrl+shift+right no_op
|
||||
map shift+cmd+] no_op
|
||||
map ctrl+tab no_op
|
||||
map ctrl+shift+left no_op
|
||||
map shift+cmd+[ no_op
|
||||
map ctrl+shift+tab no_op
|
||||
|
||||
## Titles
|
||||
tab_bar_edge top
|
||||
tab_fade 0.6 1
|
||||
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}|{title}{(lambda parts: '/'.join([p if len(p) <= 2 else p[:2]+'…' for p in parts[:-1]] + [parts[-1]]))(tab.active_wd.split('/'))}"
|
||||
active_tab_font_style bold
|
||||
active_tab_foreground #000
|
||||
active_tab_background #eee
|
||||
inactive_tab_foreground #444
|
||||
inactive_tab_background #999
|
||||
map ctrl+shift+, set_tab_title
|
||||
map ctrl+shift+alt+t no_op # set_tab_title
|
||||
map shift+cmd+i no_op # set_tab_title
|
||||
|
||||
|
||||
# map ctrl+shift+p>n kitten hints --type=linenum --linenum-action=tab nvim +{line} {path}
|
||||
|
||||
# I don't really have good way to ever press F1
|
||||
# map f1 kitten hints --customize-processing hint_define_word.py
|
||||
|
|
@ -41,7 +41,9 @@ end
|
|||
vim.call('plug#begin')
|
||||
|
||||
-- libs and dependencies
|
||||
-- Plug('nvim-lua/plenary.nvim') -- The base of all plugins
|
||||
WPlug('nvim-lua/plenary.nvim') -- The base of all plugins
|
||||
WPlug('MunifTanjim/nui.nvim') -- For some .so or .dylib neovim UI action
|
||||
|
||||
|
||||
-- plugins
|
||||
WPlug('tjdevries/nlua.nvim') -- adds symbols of vim stuffs in init.lua
|
||||
|
@ -94,6 +96,7 @@ WPlug('radenling/vim-dispatch-neovim') -- Add support for neovim's terminal
|
|||
WPlug('gennaro-tedesco/nvim-jqx') -- JSON formatter (use :Jqx*)
|
||||
WPlug('kylechui/nvim-surround') -- surrounds with tags/parenthesis
|
||||
WPlug('simrat39/rust-tools.nvim') -- config rust-analyzer and nvim integration
|
||||
WPlug('tjdevries/sg.nvim') -- Cody and other cool sourcegraph stuffs
|
||||
|
||||
-- UI & colorscheme
|
||||
WPlug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
||||
|
@ -111,7 +114,6 @@ WPlug('nvim-treesitter/nvim-treesitter-context') -- Top one-liner context of fun
|
|||
WPlug('nvim-treesitter/playground') -- Sees Treesitter AST - less hair pulling, more PRs
|
||||
WPlug('saadparwaiz1/cmp_luasnip') -- snippet engine
|
||||
WPlug('L3MON4D3/LuaSnip') -- snippet engine
|
||||
WPlug('mickael-menu/zk-nvim') -- Zettelkasten
|
||||
WPlug('folke/neodev.nvim') -- Neovim + lua development setup
|
||||
-- Switch cases:
|
||||
-- `gsp` -> PascalCase (classes), `gsc` -> camelCase (Java), `gs_` -> snake_case (C/C++/Rust)
|
||||
|
@ -209,8 +211,8 @@ vim.opt.completeopt = { "menu", "menuone", "noselect", "noinsert" }
|
|||
|
||||
|
||||
-- vim.opt.clipboard = "unnamedplus"
|
||||
-- more aggressive swap file writing. ThePrimeagen believes higher number
|
||||
-- leads to low DX
|
||||
|
||||
-- more aggressive swap file writing. ThePrimeagen believes higher number leads to low DX
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
|
@ -438,16 +440,6 @@ remap('n', '<leader>fd', function()
|
|||
require('telescope.builtin').diagnostics()
|
||||
end, { desc = '[F]ind [D]iagnostics' })
|
||||
|
||||
-- ZK remap stuffs
|
||||
remap('n', '<leader>zf', function()
|
||||
-- vim.cmd([[:ZkNotes]])
|
||||
require('zk').edit({}, { multi_select = false })
|
||||
end, { desc = '[Z]ettelkasten [F]iles' })
|
||||
|
||||
remap('n', '<leader>zg', function()
|
||||
vim.cmd(":ZkGrep")
|
||||
end, { desc = '[Z]ettelkasten [G]rep' })
|
||||
|
||||
-- tab management {{{
|
||||
|
||||
-- Jump to specific tab with <C-t>[number]
|
||||
|
@ -678,6 +670,10 @@ local on_attach = function(client, bufnr)
|
|||
-- enable inlay hints if available
|
||||
require('inlay-hints').on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
require("sg").setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
-- nvim-cmp
|
||||
|
||||
local cmp = require 'cmp'
|
||||
|
@ -1253,49 +1249,6 @@ require("rust-tools").setup {
|
|||
},
|
||||
}
|
||||
|
||||
require('zk').setup({
|
||||
picker = "telescope",
|
||||
lsp = {
|
||||
config = {
|
||||
cmd = { "zk", "lsp" },
|
||||
name = "zk",
|
||||
on_attach = on_attach,
|
||||
},
|
||||
auto_attach = {
|
||||
enable = true,
|
||||
filetypes = { "markdown" }
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Custom ZkOrphans that determines unlinked notes
|
||||
-- `:ZkOrphans {tags = {"work"}}`
|
||||
require('zk.commands').add("ZkOrphans", function(options)
|
||||
options = vim.tbl_extend("force", { orphan = true }, options or {})
|
||||
-- zk.edit opens notes picker
|
||||
require('zk').edit(options, { title = "Zk Orphans (unlinked notes)" })
|
||||
end)
|
||||
--
|
||||
-- ZkGrep: opens file picker
|
||||
-- In the case where `match_ctor` is falsy, create a prompt.
|
||||
-- This is so that we distinguish between ZkGrep and ZkNotes
|
||||
-- Params:
|
||||
-- match_ctor: string | {match= :string,...} | "" | nil
|
||||
require('zk.commands').add("ZkGrep", function(match_ctor)
|
||||
-- handle polymorphic `match_ctor`
|
||||
local grep_str = match_ctor
|
||||
local match
|
||||
if match_ctor == nil or match_ctor == '' then
|
||||
vim.fn.inputsave()
|
||||
grep_str = vim.fn.input('Grep string: >')
|
||||
match = { match = grep_str }
|
||||
elseif type(match_ctor) == 'string' then
|
||||
match = { match = grep_str }
|
||||
end
|
||||
require('zk').edit(match, { title = "Grep: '" .. grep_str .. "'", mutli_select = false })
|
||||
end)
|
||||
|
||||
|
||||
-- Gitsigns
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
|
@ -1455,3 +1408,5 @@ require("colorizer").setup {
|
|||
-- all the sub-options of filetypes apply to buftypes
|
||||
buftypes = {},
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# TODO: vim-plug and Mason supports laziness. Probably worth it to explore incremental dependencies based on the project TODO: just install these things, then symlink to mason's bin directory
|
||||
# TODO: vim-plug and Mason supports laziness. Probably worth it to explore incremental dependencies based on the project
|
||||
# TODO: just install these things, then symlink to mason's bin directory
|
||||
#
|
||||
# One thing to consider, though, /nix/store of `nix-shell` or `nix-develop`
|
||||
# might be different from `home-manager`'s (~/.nix_profile/bin/jq)
|
||||
|
@ -15,23 +16,13 @@
|
|||
# see: :/--suffix.*PATH
|
||||
# there should be mentions of additional packages
|
||||
my_neovim = pkgs.neovim-unwrapped;
|
||||
rust_pkgs =
|
||||
pkgs.rust-bin.selectLatestNightlyWith
|
||||
(
|
||||
toolchain:
|
||||
toolchain.default.override {
|
||||
extensions = ["rust-src" "rust-analyzer" "rust-docs" "rustfmt" "clippy" "miri"];
|
||||
}
|
||||
);
|
||||
nvim_pkgs =
|
||||
[
|
||||
# pkgs.gccStdenv
|
||||
pkgs.tree-sitter
|
||||
# pkgs.tree-sitter
|
||||
pkgs.fzf # file name fuzzy search
|
||||
pkgs.ripgrep # content fuzzy search
|
||||
pkgs.zk # Zettelkasten (limited support)
|
||||
pkgs.fd # Required by a Telescope plugin (?)
|
||||
pkgs.stdenv.cc.cc.lib
|
||||
pkgs.rnix-lsp # doesn't work, Mason just installs it using cargo
|
||||
pkgs.rust4cargo
|
||||
pkgs.nickel
|
||||
|
@ -140,6 +131,7 @@ in {
|
|||
vim-dispatch-neovim
|
||||
vim-fugitive
|
||||
vim-jack-in
|
||||
sg-nvim
|
||||
;
|
||||
in [
|
||||
plenary-nvim
|
||||
|
@ -185,6 +177,7 @@ in {
|
|||
vim-dispatch-neovim
|
||||
vim-fugitive
|
||||
vim-jack-in
|
||||
sg-nvim
|
||||
];
|
||||
};
|
||||
# home.packages = nvim_pkgs;
|
||||
|
|
|
@ -70,7 +70,7 @@ in {
|
|||
settings = let
|
||||
native = builtins.fromTOML (builtins.readFile "${proj_root.config.path}/starship/starship.toml");
|
||||
patch-nix = pkgs.lib.recursiveUpdate native {
|
||||
# WARNING: home-manager fails on here for some reason. Likely not at the
|
||||
# WARNING: home-manager fails on here for some reason. Likely not at the
|
||||
# validation phase (type-checking), but at evaluation phaase (stringify)
|
||||
# c.commands = [
|
||||
# ["nix" "run" "nixpkgs#clang" "--" "--version"]
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# TODO: this should use winnow with a fair matching of supported systems
|
||||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
inherit (cell) home-profiles home-modules;
|
||||
inherit (inputs) home-manager;
|
||||
pkgs = inputs.nixpkgs;
|
||||
|
||||
# hm is derivation that is compatible with homeConfigurations
|
||||
home-config = {supported_systems, hm, tested_systems ? []}:
|
||||
hm // {
|
||||
_supported_systems = supported_systems;
|
||||
_tested_systems = tested_systems;
|
||||
};
|
||||
|
||||
base-modules = [
|
||||
home-profiles.alacritty
|
||||
# home-profiles.git
|
||||
home-profiles.ssh
|
||||
home-profiles.shells
|
||||
({config.programs.home-manager.enable = true;})
|
||||
home-profiles.nix-index
|
||||
home-profiles.neovim
|
||||
];
|
||||
in {
|
||||
homeConfigurations.htran = home-config {
|
||||
supported_systems = ["aarch64-darwin" "x86_64-darwin"];
|
||||
tested_systems = ["aarch64-darwin"];
|
||||
hm = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = base-modules ++ [
|
||||
home-profiles.nerd_font_module
|
||||
home-profiles.git-htran
|
||||
home-profiles.dev-packages
|
||||
home-profiles.zk
|
||||
home-modules.darwin-spotlight
|
||||
|
||||
({
|
||||
home.username = "htran";
|
||||
home.homeDirectory = "/Users/htran";
|
||||
home.stateVersion = "23.11";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,250 +0,0 @@
|
|||
# This is an interface for home-profiles and should not contain opinionated
|
||||
# configurations. It should provide alternative configurations, aggregates
|
||||
# or new configurations
|
||||
_imports@{ inputs, cell }:
|
||||
let
|
||||
namespace = "repo";
|
||||
imports = _imports // { inherit namespace; };
|
||||
in
|
||||
{
|
||||
git = { config, lib, ... }:
|
||||
let
|
||||
cfg = config."${namespace}".git;
|
||||
baseAliases = {
|
||||
a = "add";
|
||||
c = "commit";
|
||||
ca = "commit --amend";
|
||||
cm = "commit -m";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||
sts = "status";
|
||||
co = "checkout";
|
||||
b = "branch";
|
||||
};
|
||||
default-user = "Pegasust";
|
||||
default-email = "pegasucksgg@gmail.com";
|
||||
in
|
||||
{
|
||||
options."${namespace}".git = {
|
||||
aliases = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
example = baseAliases;
|
||||
description = ''
|
||||
Additional git aliases. This settings comes with base configuration.
|
||||
Redeclaring the base config will override the values.
|
||||
''; # TODO: Add baseAliases as string here (builtins.toString doesn't work)
|
||||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = default-user;
|
||||
description = "Git username that appears on commits";
|
||||
example = default-user;
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = default-email;
|
||||
example = default-email;
|
||||
description = "Git email that appears on commits";
|
||||
};
|
||||
ignores = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
".vscode" # vscode settings
|
||||
".direnv" # .envrc cached outputs
|
||||
".DS_Store" # MacOS users, amrite
|
||||
];
|
||||
description = ''
|
||||
.gitignore patterns that are applied in every "${namespace}"sitory.
|
||||
This is useful for IDE-specific settings.
|
||||
'';
|
||||
example = [ ".direnv" "node_modules" ];
|
||||
};
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enables git
|
||||
'';
|
||||
example = false;
|
||||
};
|
||||
credentialCacheTimeoutSeconds = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 3000;
|
||||
description = "Credential cache (in-memory store) for Git in seconds.";
|
||||
example = 3000;
|
||||
};
|
||||
};
|
||||
# TODO : anyway to override configuration?
|
||||
# idk wtf I was thinking about. there is no context in this question
|
||||
config.programs.git = {
|
||||
inherit (cfg) enable ignores;
|
||||
userName = cfg.name;
|
||||
userEmail = cfg.email;
|
||||
aliases = baseAliases // cfg.aliases;
|
||||
extraConfig = {
|
||||
# TODO: in the case of darwin, git always open up the built-in keychain.
|
||||
# possibly something we can't really control since we don't have access to `nix-darwin`
|
||||
credential.helper = "cache --timeout=${builtins.toString cfg.credentialCacheTimeoutSeconds}";
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
alacritty = { config, lib, ... }:
|
||||
let
|
||||
inherit (inputs.cells.repo.lib) fromYAML;
|
||||
cfg = config."${namespace}".alacritty;
|
||||
in
|
||||
{
|
||||
options."${namespace}".alacritty = {
|
||||
font.family = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.singleLineStr;
|
||||
default = null;
|
||||
description = ''
|
||||
The font family for Alacritty
|
||||
'';
|
||||
example = "DroidSansMono NF";
|
||||
};
|
||||
font.size = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.number;
|
||||
default = 11.0;
|
||||
description = ''
|
||||
The default font size for Alacritty. This is probably measured in px.
|
||||
'';
|
||||
example = 7.0;
|
||||
};
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enables alacritty
|
||||
'';
|
||||
example = true;
|
||||
};
|
||||
config-path = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Path to alacritty yaml";
|
||||
default = null;
|
||||
example = "./config/alacritty.yaml";
|
||||
};
|
||||
};
|
||||
config.programs.alacritty = {
|
||||
enable = cfg.enable;
|
||||
settings =
|
||||
let
|
||||
actualConfig =
|
||||
if cfg.config-path != null then fromYAML (builtins.readFile cfg.config-path) else { };
|
||||
in
|
||||
lib.recursiveUpdate actualConfig {
|
||||
font.normal.family = lib.mkIf (cfg.font.family != null) cfg.font.family;
|
||||
font.size = lib.mkIf (cfg.font.size != null) cfg.font.size;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: chromium is not really supported on darwin
|
||||
private_chromium = { config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config."${namespace}".private_chromium;
|
||||
in
|
||||
{
|
||||
options."${namespace}".private_chromium = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Enable extremely lightweight chromium with vimium plugin
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (cfg.enable) {
|
||||
# home.packages = [pkgs.ungoogled-chromium];
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions =
|
||||
let
|
||||
# TODO: how about a chrome extension registry?
|
||||
mkChromiumExtForVersion = browserVersion: { id, sha256, extVersion, ... }:
|
||||
{
|
||||
inherit id;
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx" +
|
||||
"?response=redirect" +
|
||||
"&acceptformat=crx2,crx3" +
|
||||
"&prodversion=${browserVersion}" +
|
||||
"&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
name = "${id}.crx";
|
||||
inherit sha256;
|
||||
};
|
||||
version = extVersion;
|
||||
};
|
||||
mkChromiumExt = mkChromiumExtForVersion (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in
|
||||
[
|
||||
# vimium
|
||||
(mkChromiumExt {
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
sha256 = "00qhbs41gx71q026xaflgwzzridfw1sx3i9yah45cyawv8q7ziic";
|
||||
extVersion = "1.67.4";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
darwin-spotlight = { lib, pkgs, config, ... }: {
|
||||
# This patch exists since Darwin's search bar requires solid apps and not
|
||||
# symlinked
|
||||
# TODO: QA
|
||||
# - [x] works for base case
|
||||
# - [x] works for repeated case
|
||||
# - [ ] works after base case, then removed
|
||||
# - [ ] works for repeated case, then removed
|
||||
|
||||
# Copy GUI apps to "~/Applications/Home Manager Apps"
|
||||
# Based on this comment: https://github.com/nix-community/home-manager/issues/1341#issuecomment-778820334
|
||||
home.activation.patch-spotlight =
|
||||
if pkgs.stdenv.isDarwin then
|
||||
let
|
||||
apps = pkgs.buildEnv {
|
||||
name = "home-manager-applications";
|
||||
paths = config.home.packages;
|
||||
pathsToLink = "/Applications";
|
||||
};
|
||||
in
|
||||
lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
# Install MacOS applications to the user environment.
|
||||
HM_APPS="$HOME/Applications/Home Manager Apps"
|
||||
# Reset current state
|
||||
if [ -e "$HM_APPS" ]; then
|
||||
$DRY_RUN_CMD mv "$HM_APPS" "$HM_APPS.$(date +%Y%m%d%H%M%S)"
|
||||
fi
|
||||
$DRY_RUN_CMD mkdir -p "$HM_APPS"
|
||||
# .app dirs need to be actual directories for Finder to detect them as Apps.
|
||||
# In the env of Apps we build, the .apps are symlinks. We pass all of them as
|
||||
# arguments to cp and make it dereference those using -H
|
||||
$DRY_RUN_CMD cp --archive -H --dereference ${apps}/Applications/* "$HM_APPS"
|
||||
$DRY_RUN_CMD chmod +w -R "$HM_APPS"
|
||||
''
|
||||
else
|
||||
"";
|
||||
# We need this in case upstream home-manager changes the behavior of linking
|
||||
# applications
|
||||
home.activation.remove-patch-spotlight =
|
||||
if pkgs.stdenv.isDarwin then
|
||||
lib.hm.dag.entryBefore [ "checkLinkTargets" ] ''
|
||||
HM_APPS="$HOME/Applications/Home Manager Apps"
|
||||
# Reset current state
|
||||
if [ -e "$HM_APPS" ]; then
|
||||
$DRY_RUN_CMD mv "$HM_APPS" "$HM_APPS.$(date +%Y%m%d%H%M%S)"
|
||||
fi
|
||||
''
|
||||
else
|
||||
"";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -21,4 +21,16 @@ in {
|
|||
});
|
||||
};
|
||||
|
||||
# sg-nvim = inputs.nixpkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
# pname = "sg.nvim";
|
||||
# version = "2023-06-20";
|
||||
# src = inputs.nixpkgs.fetchFromGitHub {
|
||||
# owner = "sourcegraph";
|
||||
# repo = "sg.nvim";
|
||||
# rev = "b87f87614357e0a7e6ff888918532ea11e87feb3";
|
||||
# sha256 = "1xmj05i4bw2cx9d18mm85ynkn29dkngn5090r71wssvan6dm3fb4";
|
||||
# };
|
||||
# meta.homepage = "https://github.com/sourcegraph/sg.nvim/";
|
||||
# };
|
||||
sg-nvim = inputs.sg-nvim.packages.${system}.default;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
# TODO: this should use winnow with a fair matching of supported systems
|
||||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
inherit (cell) home-profiles home-modules;
|
||||
inherit (inputs) home-manager;
|
||||
pkgs = inputs.nixpkgs;
|
||||
|
||||
# hm is derivation that is compatible with homeConfigurations
|
||||
home-config = {
|
||||
supported_systems,
|
||||
hm,
|
||||
tested_systems ? [],
|
||||
}:
|
||||
hm
|
||||
// {
|
||||
_supported_systems = supported_systems;
|
||||
_tested_systems = tested_systems;
|
||||
};
|
||||
|
||||
base-modules = [
|
||||
home-profiles.alacritty
|
||||
home-profiles.kitty
|
||||
home-profiles.git
|
||||
home-profiles.ssh
|
||||
home-profiles.shells
|
||||
{config.programs.home-manager.enable = true;}
|
||||
home-profiles.nix-index
|
||||
home-profiles.neovim
|
||||
];
|
||||
in {
|
||||
homeConfigurations.htran = home-config {
|
||||
supported_systems = ["aarch64-darwin" "x86_64-darwin"];
|
||||
tested_systems = ["aarch64-darwin"];
|
||||
hm = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules =
|
||||
base-modules
|
||||
++ [
|
||||
home-profiles.nerd_font_module
|
||||
home-profiles.git-htran
|
||||
home-profiles.dev-packages
|
||||
home-profiles.zk
|
||||
home-modules.darwin-spotlight
|
||||
|
||||
{
|
||||
home.username = "htran";
|
||||
home.homeDirectory = "/Users/htran";
|
||||
home.stateVersion = "23.11";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,292 @@
|
|||
# This is an interface for home-profiles and should not contain opinionated
|
||||
# configurations. It should provide alternative configurations, aggregates
|
||||
# or new configurations
|
||||
_imports @ {
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
namespace = "repo";
|
||||
imports = _imports // {inherit namespace;};
|
||||
in {
|
||||
git = {
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
cfg = config."${namespace}".git;
|
||||
baseAliases = {
|
||||
a = "add";
|
||||
c = "commit";
|
||||
ca = "commit --amend";
|
||||
cm = "commit -m";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||
sts = "status";
|
||||
co = "checkout";
|
||||
b = "branch";
|
||||
};
|
||||
default-user = "Pegasust";
|
||||
default-email = "pegasucksgg@gmail.com";
|
||||
in {
|
||||
options."${namespace}".git = {
|
||||
aliases = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
example = baseAliases;
|
||||
description = ''
|
||||
Additional git aliases. This settings comes with base configuration.
|
||||
Redeclaring the base config will override the values.
|
||||
''; # TODO: Add baseAliases as string here (builtins.toString doesn't work)
|
||||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = default-user;
|
||||
description = "Git username that appears on commits";
|
||||
example = default-user;
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = default-email;
|
||||
example = default-email;
|
||||
description = "Git email that appears on commits";
|
||||
};
|
||||
ignores = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
".vscode" # vscode settings
|
||||
".direnv" # .envrc cached outputs
|
||||
".DS_Store" # MacOS users, amrite
|
||||
];
|
||||
description = ''
|
||||
.gitignore patterns that are applied in every "${namespace}"sitory.
|
||||
This is useful for IDE-specific settings.
|
||||
'';
|
||||
example = [".direnv" "node_modules"];
|
||||
};
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enables git
|
||||
'';
|
||||
example = false;
|
||||
};
|
||||
credentialCacheTimeoutSeconds = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 3000;
|
||||
description = "Credential cache (in-memory store) for Git in seconds.";
|
||||
example = 3000;
|
||||
};
|
||||
};
|
||||
# TODO : anyway to override configuration?
|
||||
# idk wtf I was thinking about. there is no context in this question
|
||||
config.programs.git = {
|
||||
inherit (cfg) enable ignores;
|
||||
userName = cfg.name;
|
||||
userEmail = cfg.email;
|
||||
aliases = baseAliases // cfg.aliases;
|
||||
extraConfig = {
|
||||
# TODO: in the case of darwin, git always open up the built-in keychain.
|
||||
# possibly something we can't really control since we don't have access to `nix-darwin`
|
||||
credential.helper = "cache --timeout=${builtins.toString cfg.credentialCacheTimeoutSeconds}";
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
alacritty = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.cells.repo.lib) fromYAML;
|
||||
cfg = config."${namespace}".alacritty;
|
||||
in {
|
||||
options."${namespace}".alacritty = {
|
||||
font.family = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.singleLineStr;
|
||||
default = null;
|
||||
description = ''
|
||||
The font family for Alacritty
|
||||
'';
|
||||
example = "DroidSansMono NF";
|
||||
};
|
||||
font.size = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.number;
|
||||
default = 11.0;
|
||||
description = ''
|
||||
The default font size for Alacritty. This is probably measured in px.
|
||||
'';
|
||||
example = 7.0;
|
||||
};
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enables alacritty
|
||||
'';
|
||||
example = true;
|
||||
};
|
||||
config-path = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Path to alacritty yaml";
|
||||
default = null;
|
||||
example = "./config/alacritty.yaml";
|
||||
};
|
||||
};
|
||||
config.programs.alacritty = {
|
||||
enable = cfg.enable;
|
||||
settings = let
|
||||
actualConfig =
|
||||
if cfg.config-path != null
|
||||
then fromYAML (builtins.readFile cfg.config-path)
|
||||
else {};
|
||||
in
|
||||
lib.recursiveUpdate actualConfig {
|
||||
font.normal.family = lib.mkIf (cfg.font.family != null) cfg.font.family;
|
||||
font.size = lib.mkIf (cfg.font.size != null) cfg.font.size;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
kitty = {
|
||||
config,
|
||||
lib,
|
||||
# pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config."${namespace}".kitty;
|
||||
in {
|
||||
options."${namespace}".kitty = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enables kitty";
|
||||
};
|
||||
conf = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = "Path to kitty.conf. See https://sw.kovidgoyal.net/kitty/conf.html";
|
||||
example = "../../../native_configs/kitty/kitty.conf";
|
||||
};
|
||||
};
|
||||
config.programs.kitty = {
|
||||
enable = cfg.enable;
|
||||
extraConfig = lib.mkIf (cfg.conf != null) (builtins.readFile cfg.conf);
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: chromium is not really supported on darwin
|
||||
private_chromium = {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config."${namespace}".private_chromium;
|
||||
in {
|
||||
options."${namespace}".private_chromium = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Enable extremely lightweight chromium with vimium plugin
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (cfg.enable) {
|
||||
# home.packages = [pkgs.ungoogled-chromium];
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions = let
|
||||
# TODO: how about a chrome extension registry?
|
||||
mkChromiumExtForVersion = browserVersion: {
|
||||
id,
|
||||
sha256,
|
||||
extVersion,
|
||||
...
|
||||
}: {
|
||||
inherit id;
|
||||
crxPath = builtins.fetchurl {
|
||||
url =
|
||||
"https://clients2.google.com/service/update2/crx"
|
||||
+ "?response=redirect"
|
||||
+ "&acceptformat=crx2,crx3"
|
||||
+ "&prodversion=${browserVersion}"
|
||||
+ "&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
name = "${id}.crx";
|
||||
inherit sha256;
|
||||
};
|
||||
version = extVersion;
|
||||
};
|
||||
mkChromiumExt = mkChromiumExtForVersion (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in [
|
||||
# vimium
|
||||
(mkChromiumExt {
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
sha256 = "00qhbs41gx71q026xaflgwzzridfw1sx3i9yah45cyawv8q7ziic";
|
||||
extVersion = "1.67.4";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
darwin-spotlight = {
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# This patch exists since Darwin's search bar requires solid apps and not
|
||||
# symlinked
|
||||
# TODO: QA
|
||||
# - [x] works for base case
|
||||
# - [x] works for repeated case
|
||||
# - [ ] works after base case, then removed
|
||||
# - [ ] works for repeated case, then removed
|
||||
|
||||
# Copy GUI apps to "~/Applications/Home Manager Apps"
|
||||
# Based on this comment: https://github.com/nix-community/home-manager/issues/1341#issuecomment-778820334
|
||||
home.activation.patch-spotlight =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then let
|
||||
apps = pkgs.buildEnv {
|
||||
name = "home-manager-applications";
|
||||
paths = config.home.packages;
|
||||
pathsToLink = "/Applications";
|
||||
};
|
||||
in
|
||||
lib.hm.dag.entryAfter ["linkGeneration"] ''
|
||||
# Install MacOS applications to the user environment.
|
||||
HM_APPS="$HOME/Applications/Home Manager Apps"
|
||||
# Reset current state
|
||||
if [ -e "$HM_APPS" ]; then
|
||||
$DRY_RUN_CMD mv "$HM_APPS" "$HM_APPS.$(date +%Y%m%d%H%M%S)"
|
||||
fi
|
||||
$DRY_RUN_CMD mkdir -p "$HM_APPS"
|
||||
# .app dirs need to be actual directories for Finder to detect them as Apps.
|
||||
# In the env of Apps we build, the .apps are symlinks. We pass all of them as
|
||||
# arguments to cp and make it dereference those using -H
|
||||
$DRY_RUN_CMD cp --archive -H --dereference ${apps}/Applications/* "$HM_APPS"
|
||||
$DRY_RUN_CMD chmod +w -R "$HM_APPS"
|
||||
''
|
||||
else "";
|
||||
# We need this in case upstream home-manager changes the behavior of linking
|
||||
# applications
|
||||
home.activation.remove-patch-spotlight =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then
|
||||
lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
HM_APPS="$HOME/Applications/Home Manager Apps"
|
||||
# Reset current state
|
||||
if [ -e "$HM_APPS" ]; then
|
||||
$DRY_RUN_CMD mv "$HM_APPS" "$HM_APPS.$(date +%Y%m%d%H%M%S)"
|
||||
fi
|
||||
''
|
||||
else "";
|
||||
};
|
||||
}
|
|
@ -67,9 +67,7 @@ in {
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config."${namespace}".alacritty;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
inputs.cells.repo.home-modules.alacritty
|
||||
];
|
||||
|
@ -81,6 +79,20 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
kitty = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.cells.repo.home-modules.kitty
|
||||
];
|
||||
config."${namespace}".kitty = {
|
||||
enable = true;
|
||||
conf = "${inputs.self}/native_configs/kitty/kitty.conf";
|
||||
};
|
||||
};
|
||||
|
||||
shells = import ./shells.nix imports;
|
||||
|
||||
git = {
|
||||
|
@ -148,7 +160,6 @@ in {
|
|||
};
|
||||
|
||||
git-htran = {
|
||||
imports = [inputs.cells.repo.home-profiles.git];
|
||||
config."${namespace}".profile.git = {
|
||||
name = "htran";
|
||||
email = "htran@egihosting.com";
|
||||
|
@ -156,14 +167,15 @@ in {
|
|||
};
|
||||
|
||||
git-pegasust = {
|
||||
imports = [inputs.cells.repo.home-profiles.git];
|
||||
config."${namespace}".profile.git = {
|
||||
email = "pegasucksgg@gmail.com";
|
||||
name = "pegasust";
|
||||
};
|
||||
};
|
||||
|
||||
dev-packages = let pkgs = inputs.nixpkgs; in {
|
||||
dev-packages = let
|
||||
pkgs = inputs.nixpkgs;
|
||||
in {
|
||||
programs.jq.enable = true;
|
||||
home.packages = [
|
||||
pkgs.htop
|
|
@ -1,5 +1,5 @@
|
|||
# TODO: vim-plug and Mason supports laziness. Probably worth it to explore incremental dependencies based on the project TODO: just install these things, then symlink to mason's bin directory
|
||||
#
|
||||
# TODO: vim-plug and Mason supports laziness. Probably worth it to explore incremental dependencies based on the project
|
||||
# TODO: just install these things, then symlink to mason's bin directory
|
||||
# One thing to consider, though, /nix/store of `nix-shell` or `nix-develop`
|
||||
# might be different from `home-manager`'s (~/.nix_profile/bin/jq)
|
||||
{
|
||||
|
@ -12,13 +12,15 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs) system;
|
||||
# NOTE: Add packages to nvim_pkgs instead, so that it's available at userspace
|
||||
# and is added to the path after wrapping.
|
||||
# check: nix repl `homeConfigurations.hungtr.config.programs.neovim.finalPackage.buildCommand`
|
||||
# see: :/--suffix.*PATH
|
||||
# there should be mentions of additional packages
|
||||
my_neovim = pkgs.neovim-unwrapped;
|
||||
inherit (inputs.nixpkgs) system;
|
||||
# my_neovim = pkgs.neovim-unwrapped;
|
||||
|
||||
my_neovim = inputs.neovim-nightly-overlay.packages.${system}.neovim;
|
||||
nvim_pkgs =
|
||||
[
|
||||
# pkgs.gccStdenv
|
||||
|
@ -28,10 +30,11 @@
|
|||
pkgs.zk # Zettelkasten (limited support)
|
||||
pkgs.fd # Required by a Telescope plugin (?)
|
||||
pkgs.stdenv.cc.cc.lib
|
||||
pkgs.nil # oxalica's better nix language server
|
||||
pkgs.nil # oxalica's better nix language server
|
||||
inputs.nix-boost.packages."${system}".rust4cargo
|
||||
pkgs.nickel
|
||||
pkgs.nls
|
||||
inputs.sg-nvim.packages.${system}.default
|
||||
|
||||
pkgs.go # doesn't work, Mason installs from runtime path
|
||||
|
||||
|
@ -126,7 +129,9 @@ in {
|
|||
vim-dispatch-neovim
|
||||
vim-fugitive
|
||||
vim-jack-in
|
||||
nui-nvim
|
||||
;
|
||||
inherit (inputs.cells.dotfiles.packages) sg-nvim;
|
||||
in [
|
||||
plenary-nvim
|
||||
nvim-treesitter.withAllGrammars
|
||||
|
@ -171,6 +176,16 @@ in {
|
|||
vim-dispatch-neovim
|
||||
vim-fugitive
|
||||
vim-jack-in
|
||||
({
|
||||
plugin = sg-nvim;
|
||||
# Wait, this mean the plugin is only lua only since package.cpath is Lua API
|
||||
config = ''
|
||||
package.cpath = package.cpath .. ";${sg-nvim}/lib/*.so;${sg-nvim}/lib/*.dylib"
|
||||
'';
|
||||
type = "lua";
|
||||
|
||||
})
|
||||
nui-nvim
|
||||
];
|
||||
};
|
||||
# home.packages = nvim_pkgs;
|
|
@ -69,7 +69,7 @@ in {
|
|||
settings = let
|
||||
native = builtins.fromTOML (builtins.readFile "${inputs.self}/native_configs/starship/starship.toml");
|
||||
patch-nix = pkgs.lib.recursiveUpdate native {
|
||||
# WARNING: home-manager fails on here for some reason. Likely not at the
|
||||
# WARNING: home-manager fails on here for some reason. Likely not at the
|
||||
# validation phase (type-checking), but at evaluation phaase (stringify)
|
||||
# I'm thinking when `settings` are evaluated, it has some sort of
|
||||
# recursive processing before it gets turned into a toml
|
|
@ -1,16 +1,20 @@
|
|||
{ inputs, cell }:
|
||||
let
|
||||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
namespace = "repo"; # ignore: unused
|
||||
|
||||
yamlToJsonDrv = pkgs: yamlContent: outputPath: (pkgs.runCommand
|
||||
outputPath
|
||||
{ inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; }
|
||||
{
|
||||
inherit yamlContent;
|
||||
nativeBuildInputs = [pkgs.yq];
|
||||
}
|
||||
# run yq which outputs '.' (no filter) on file at yamlPath
|
||||
# note that $out is passed onto the bash/sh script for execution
|
||||
''
|
||||
echo "$yamlContent" | yq >$out
|
||||
'');
|
||||
in
|
||||
{
|
||||
in {
|
||||
fromYAML = yamlContent: builtins.fromJSON (builtins.readFile (yamlToJsonDrv inputs.nixpkgs yamlContent "fromYaml.json"));
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright (c) 2020-2021 Eelco Dolstra and the flake-compat contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,29 +0,0 @@
|
|||
# flake-compat
|
||||
|
||||
## Usage
|
||||
|
||||
To use, add the following to your `flake.nix`:
|
||||
|
||||
```nix
|
||||
inputs.flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
```
|
||||
|
||||
Afterwards, create a `default.nix` file containing the following:
|
||||
|
||||
```nix
|
||||
(import
|
||||
(
|
||||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{ src = ./.; }
|
||||
).defaultNix
|
||||
```
|
||||
|
||||
If you would like a `shell.nix` file, create one containing the above, replacing `defaultNix` with `shellNix`.
|
|
@ -1,301 +0,0 @@
|
|||
# Compatibility function to allow flakes to be used by
|
||||
# non-flake-enabled Nix versions. Given a source tree containing a
|
||||
# 'flake.nix' and 'flake.lock' file, it fetches the flake inputs and
|
||||
# calls the flake's 'outputs' function. It then returns an attrset
|
||||
# containing 'defaultNix' (to be used in 'default.nix'), 'shellNix'
|
||||
# (to be used in 'shell.nix').
|
||||
{
|
||||
src,
|
||||
system ? builtins.currentSystem or "unknown-system",
|
||||
}: let
|
||||
lockFilePath = src + "/flake.lock";
|
||||
|
||||
lockFile = builtins.fromJSON (builtins.readFile lockFilePath);
|
||||
|
||||
fetchTree = info:
|
||||
if info.type == "github"
|
||||
then {
|
||||
outPath =
|
||||
fetchTarball
|
||||
(
|
||||
{url = "https://api.${info.host or "github.com"}/repos/${info.owner}/${info.repo}/tarball/${info.rev}";}
|
||||
// (
|
||||
if info ? narHash
|
||||
then {sha256 = info.narHash;}
|
||||
else {}
|
||||
)
|
||||
);
|
||||
rev = info.rev;
|
||||
shortRev = builtins.substring 0 7 info.rev;
|
||||
lastModified = info.lastModified;
|
||||
lastModifiedDate = formatSecondsSinceEpoch info.lastModified;
|
||||
narHash = info.narHash;
|
||||
}
|
||||
else if info.type == "git"
|
||||
then
|
||||
{
|
||||
outPath =
|
||||
builtins.fetchGit
|
||||
(
|
||||
{url = info.url;}
|
||||
// (
|
||||
if info ? rev
|
||||
then {inherit (info) rev;}
|
||||
else {}
|
||||
)
|
||||
// (
|
||||
if info ? ref
|
||||
then {inherit (info) ref;}
|
||||
else {}
|
||||
)
|
||||
// (
|
||||
if info ? submodules
|
||||
then {inherit (info) submodules;}
|
||||
else {}
|
||||
)
|
||||
);
|
||||
lastModified = info.lastModified;
|
||||
lastModifiedDate = formatSecondsSinceEpoch info.lastModified;
|
||||
narHash = info.narHash;
|
||||
}
|
||||
// (
|
||||
if info ? rev
|
||||
then {
|
||||
rev = info.rev;
|
||||
shortRev = builtins.substring 0 7 info.rev;
|
||||
}
|
||||
else {}
|
||||
)
|
||||
else if info.type == "path"
|
||||
then {
|
||||
outPath = builtins.path {
|
||||
path =
|
||||
if builtins.substring 0 1 info.path != "/"
|
||||
then src + ("/" + info.path) # make this absolute path by prepending ./
|
||||
else info.path; # it's already an absolute path
|
||||
};
|
||||
narHash = info.narHash;
|
||||
}
|
||||
else if info.type == "tarball"
|
||||
then {
|
||||
outPath =
|
||||
fetchTarball
|
||||
(
|
||||
{inherit (info) url;}
|
||||
// (
|
||||
if info ? narHash
|
||||
then {sha256 = info.narHash;}
|
||||
else {}
|
||||
)
|
||||
);
|
||||
}
|
||||
else if info.type == "gitlab"
|
||||
then {
|
||||
inherit (info) rev narHash lastModified;
|
||||
outPath =
|
||||
fetchTarball
|
||||
(
|
||||
{url = "https://${info.host or "gitlab.com"}/api/v4/projects/${info.owner}%2F${info.repo}/repository/archive.tar.gz?sha=${info.rev}";}
|
||||
// (
|
||||
if info ? narHash
|
||||
then {sha256 = info.narHash;}
|
||||
else {}
|
||||
)
|
||||
);
|
||||
shortRev = builtins.substring 0 7 info.rev;
|
||||
}
|
||||
else
|
||||
# FIXME: add Mercurial, tarball inputs.
|
||||
throw "flake input has unsupported input type '${info.type}'";
|
||||
|
||||
callFlake4 = flakeSrc: locks: let
|
||||
flake = import (flakeSrc + "/flake.nix");
|
||||
|
||||
inputs =
|
||||
builtins.mapAttrs
|
||||
(n: v:
|
||||
if v.flake or true
|
||||
then callFlake4 (fetchTree (v.locked // v.info)) v.inputs
|
||||
else fetchTree (v.locked // v.info))
|
||||
locks;
|
||||
|
||||
outputs = flakeSrc // (flake.outputs (inputs // {self = outputs;}));
|
||||
in
|
||||
assert flake.edition == 201909; outputs;
|
||||
|
||||
callLocklessFlake = flakeSrc: let
|
||||
flake = import (flakeSrc + "/flake.nix");
|
||||
outputs = flakeSrc // (flake.outputs {self = outputs;});
|
||||
in
|
||||
outputs;
|
||||
|
||||
rootSrc = let
|
||||
# Try to clean the source tree by using fetchGit, if this source
|
||||
# tree is a valid git repository.
|
||||
tryFetchGit = src:
|
||||
if isGit && !isShallow
|
||||
then let
|
||||
res = builtins.fetchGit src;
|
||||
in
|
||||
if res.rev == "0000000000000000000000000000000000000000"
|
||||
then removeAttrs res ["rev" "shortRev"]
|
||||
else res
|
||||
else {outPath = src;};
|
||||
# NB git worktrees have a file for .git, so we don't check the type of .git
|
||||
isGit = builtins.pathExists (src + "/.git");
|
||||
isShallow = builtins.pathExists (src + "/.git/shallow");
|
||||
in
|
||||
{
|
||||
lastModified = 0;
|
||||
lastModifiedDate = formatSecondsSinceEpoch 0;
|
||||
}
|
||||
// (
|
||||
if src ? outPath
|
||||
then src
|
||||
else tryFetchGit src
|
||||
);
|
||||
|
||||
# Format number of seconds in the Unix epoch as %Y%m%d%H%M%S.
|
||||
formatSecondsSinceEpoch = t: let
|
||||
rem = x: y: x - x / y * y;
|
||||
days = t / 86400;
|
||||
secondsInDay = rem t 86400;
|
||||
hours = secondsInDay / 3600;
|
||||
minutes = (rem secondsInDay 3600) / 60;
|
||||
seconds = rem t 60;
|
||||
|
||||
# Courtesy of https://stackoverflow.com/a/32158604.
|
||||
z = days + 719468;
|
||||
era =
|
||||
(
|
||||
if z >= 0
|
||||
then z
|
||||
else z - 146096
|
||||
)
|
||||
/ 146097;
|
||||
doe = z - era * 146097;
|
||||
yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365;
|
||||
y = yoe + era * 400;
|
||||
doy = doe - (365 * yoe + yoe / 4 - yoe / 100);
|
||||
mp = (5 * doy + 2) / 153;
|
||||
d = doy - (153 * mp + 2) / 5 + 1;
|
||||
m =
|
||||
mp
|
||||
+ (
|
||||
if mp < 10
|
||||
then 3
|
||||
else -9
|
||||
);
|
||||
y' =
|
||||
y
|
||||
+ (
|
||||
if m <= 2
|
||||
then 1
|
||||
else 0
|
||||
);
|
||||
|
||||
pad = s:
|
||||
if builtins.stringLength s < 2
|
||||
then "0" + s
|
||||
else s;
|
||||
in "${toString y'}${pad (toString m)}${pad (toString d)}${pad (toString hours)}${pad (toString minutes)}${pad (toString seconds)}";
|
||||
|
||||
allNodes =
|
||||
builtins.mapAttrs
|
||||
(
|
||||
key: node: let
|
||||
sourceInfo =
|
||||
if key == lockFile.root
|
||||
then rootSrc
|
||||
else fetchTree (node.info or {} // removeAttrs node.locked ["dir"]);
|
||||
|
||||
subdir =
|
||||
if key == lockFile.root
|
||||
then ""
|
||||
else node.locked.dir or "";
|
||||
|
||||
flake = import (sourceInfo
|
||||
+ (
|
||||
if subdir != ""
|
||||
then "/"
|
||||
else ""
|
||||
)
|
||||
+ subdir
|
||||
+ "/flake.nix");
|
||||
|
||||
inputs =
|
||||
builtins.mapAttrs
|
||||
(inputName: inputSpec: allNodes.${resolveInput inputSpec})
|
||||
(node.inputs or {});
|
||||
|
||||
# Resolve a input spec into a node name. An input spec is
|
||||
# either a node name, or a 'follows' path from the root
|
||||
# node.
|
||||
resolveInput = inputSpec:
|
||||
if builtins.isList inputSpec
|
||||
then getInputByPath lockFile.root inputSpec
|
||||
else inputSpec;
|
||||
|
||||
# Follow an input path (e.g. ["dwarffs" "nixpkgs"]) from the
|
||||
# root node, returning the final node.
|
||||
getInputByPath = nodeName: path:
|
||||
if path == []
|
||||
then nodeName
|
||||
else
|
||||
getInputByPath
|
||||
# Since this could be a 'follows' input, call resolveInput.
|
||||
(resolveInput lockFile.nodes.${nodeName}.inputs.${builtins.head path})
|
||||
(builtins.tail path);
|
||||
|
||||
outputs = flake.outputs (inputs // {self = result;});
|
||||
|
||||
result =
|
||||
outputs
|
||||
// sourceInfo
|
||||
// {
|
||||
inherit inputs;
|
||||
inherit outputs;
|
||||
inherit sourceInfo;
|
||||
};
|
||||
in
|
||||
if node.flake or true
|
||||
then assert builtins.isFunction flake.outputs; result
|
||||
else sourceInfo
|
||||
)
|
||||
lockFile.nodes;
|
||||
|
||||
result =
|
||||
if !(builtins.pathExists lockFilePath)
|
||||
then callLocklessFlake rootSrc
|
||||
else if lockFile.version == 4
|
||||
then callFlake4 rootSrc (lockFile.inputs)
|
||||
else if lockFile.version >= 5 && lockFile.version <= 7
|
||||
then allNodes.${lockFile.root}
|
||||
else throw "lock file '${lockFilePath}' has unsupported version ${toString lockFile.version}";
|
||||
in rec {
|
||||
defaultNix =
|
||||
(builtins.removeAttrs result ["__functor"])
|
||||
// (
|
||||
if result ? defaultPackage.${system}
|
||||
then {default = result.defaultPackage.${system};}
|
||||
else {}
|
||||
)
|
||||
// (
|
||||
if result ? packages.${system}.default
|
||||
then {default = result.packages.${system}.default;}
|
||||
else {}
|
||||
);
|
||||
|
||||
shellNix =
|
||||
defaultNix
|
||||
// (
|
||||
if result ? devShell.${system}
|
||||
then {default = result.devShell.${system};}
|
||||
else {}
|
||||
)
|
||||
// (
|
||||
if result ? devShells.${system}.default
|
||||
then {default = result.devShells.${system}.default;}
|
||||
else {}
|
||||
);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
name: Test
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: 'Test'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.2
|
||||
- uses: cachix/install-nix-action@v17
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: guibou
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Build all
|
||||
run: nix-build all.nix
|
||||
|
|
@ -1,248 +0,0 @@
|
|||
# NixGL
|
||||
|
||||
NixGL solve the "OpenGL" problem with [nix](https://nixos.org/nix/). It works with all mesa drivers (Intel cards and "free" version for Nvidia or AMD cards), Nvidia proprietary drivers, and even with hybrid configuration via bumblebee. It works for Vulkan programs too.
|
||||
|
||||
# Motivation
|
||||
|
||||
Using Nix on non-NixOS distros, it's common to see GL application errors:
|
||||
|
||||
```bash
|
||||
$ program
|
||||
libGL error: unable to load driver: i965_dri.so
|
||||
libGL error: driver pointer missing
|
||||
libGL error: failed to load driver: i965
|
||||
libGL error: unable to load driver: i965_dri.so
|
||||
libGL error: driver pointer missing
|
||||
libGL error: failed to load driver: i965
|
||||
libGL error: unable to load driver: swrast_dri.so
|
||||
libGL error: failed to load driver: swrast
|
||||
```
|
||||
|
||||
NixGL provides a set of wrappers able to launch GL or Vulkan applications:
|
||||
|
||||
```bash
|
||||
$ nixGL program
|
||||
$ nixVulkan program
|
||||
```
|
||||
|
||||
# Installation
|
||||
|
||||
## nix-channel (Recommended)
|
||||
|
||||
To get started,
|
||||
|
||||
```bash
|
||||
$ nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update
|
||||
$ nix-env -iA nixgl.auto.nixGLDefault # or replace `nixGLDefault` with your desired wrapper
|
||||
```
|
||||
|
||||
Many wrappers are available, depending on your hardware and the graphical API you want to use (i.e. Vulkan or OpenGL). You may want to install a few of them, for example if you want to support OpenGL and Vulkan on a laptop with an hybrid configuration.
|
||||
|
||||
OpenGL wrappers:
|
||||
|
||||
- `auto.nixGLDefault`: Tries to auto-detect and install Nvidia, if not, fallback to mesa. Recommended. Invoke with `nixGL program`.
|
||||
- `auto.nixGLNvidia`: Proprietary Nvidia driver (auto detection of version)
|
||||
- `auto.nixGLNvidiaBumblebee`: Proprietary Nvidia driver on hybrid hardware (auto detection).
|
||||
- `nixGLIntel`: Mesa OpenGL implementation (intel, amd, nouveau, ...).
|
||||
|
||||
Vulkan wrappers:
|
||||
|
||||
- `auto.nixVulkanNvidia`: Proprietary Nvidia driver (auto detection).
|
||||
- `nixVulkanIntel`: Mesa Vulkan implementation.
|
||||
|
||||
The Vulkan wrapper also sets `VK_LAYER_PATH` the validation layers in the nix store.
|
||||
|
||||
## Flakes
|
||||
|
||||
### Directly run nixGL
|
||||
|
||||
You need to specify the same version of `nixpkgs` that your `program` is using. For example, replace `nixos-21.11` with `nixos-21.05`.
|
||||
|
||||
```sh
|
||||
nix run --override-input nixpkgs nixpkgs/nixos-21.11 --impure github:guibou/nixGL -- program
|
||||
```
|
||||
|
||||
If you use the default `nixpkgs` channel (i.e. `nixpkgs-unstable`), you can ommit those arguments like so:
|
||||
|
||||
```sh
|
||||
nix run --impure github:guibou/nixGL -- program
|
||||
```
|
||||
|
||||
You can also specify which wrapper to use instead of using the default auto detection:
|
||||
|
||||
```sh
|
||||
nix run github:guibou/nixGL#nixGLIntel -- program
|
||||
```
|
||||
|
||||
This will result in a lighter download and execution time. Also, this evaluation is pure.
|
||||
|
||||
|
||||
#### Error about experimental features
|
||||
|
||||
You can directly use:
|
||||
|
||||
```sh
|
||||
nix --extra-experimental-features "nix-command flakes" run --impure github:guibou/nixGL -- program
|
||||
```
|
||||
|
||||
Or set the appropriate conf in `~/.config/nix/nix.conf` / `/etc/nix/nix.conf` / `nix.extraOptions`.
|
||||
|
||||
#### Error with GLIBC version
|
||||
|
||||
if you get errors with messages similar to
|
||||
```
|
||||
/nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/hrl51nkr7dszlwcs29wmyxq0jsqlaszn-libglvnd-1.4.0/lib/libGLX.so.0)
|
||||
```
|
||||
|
||||
It means that there's a mismatch between the versions of `nixpkgs` used by `nixGL` and `program`.
|
||||
|
||||
### Use an overlay
|
||||
|
||||
Add nixGL as a flake input:
|
||||
|
||||
|
||||
```Nix
|
||||
{
|
||||
inputs = {
|
||||
nixgl.url = "github:guibou/nixGL";
|
||||
};
|
||||
outputs = { nixgl, ... }: { };
|
||||
}
|
||||
```
|
||||
|
||||
Then, use the flake's `overlay` attr:
|
||||
|
||||
```Nix
|
||||
{
|
||||
outputs = { nixgl, nixpkgs, ... }:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [ nixgl.overlay ];
|
||||
};
|
||||
in
|
||||
# You can now reference pkgs.nixgl.nixGLIntel, etc.
|
||||
{ }
|
||||
}
|
||||
```
|
||||
|
||||
## Installation from source
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/guibou/nixGL
|
||||
$ cd nixGL
|
||||
$ nix-env -f ./ -iA <your desired wrapper name>
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Just launch the program you want prefixed by the right wrapper.
|
||||
|
||||
For example, for OpenGL programs:
|
||||
|
||||
```bash
|
||||
$ nixGL program args # For the `nixGLDefault` wrapper, recommended.
|
||||
$ nixGLNvidia program args
|
||||
$ nixGLIntel program args
|
||||
$ nixGLNvidiaBumblebee program args
|
||||
```
|
||||
|
||||
For Vulkan programs:
|
||||
|
||||
```bash
|
||||
$ nixVulkanNvidia program args
|
||||
$ nixVulkanIntel program args
|
||||
```
|
||||
|
||||
# OpenGL - Hybrid Intel + Nvidia laptop
|
||||
|
||||
After installing `nixGLIntel` and `nixGLNvidiaBumblebee`.
|
||||
|
||||
```bash
|
||||
$ nixGLIntel $(nix run nixpkgs.glxinfo -c glxinfo) | grep -i 'OpenGL version string'
|
||||
OpenGL version string: 3.0 Mesa 17.3.3
|
||||
$ nixGLNvidiaBumblebee $(nix run nixpkgs.glxinfo -c glxinfo) | grep -i 'OpenGL version string'
|
||||
OpenGL version string: 4.6.0 NVIDIA 390.25
|
||||
```
|
||||
|
||||
If the program you'd like to run is already installed by nix in your current environment, you can simply run it with the wrapper, for example:
|
||||
|
||||
```bash
|
||||
$ nixGLIntel blender
|
||||
```
|
||||
|
||||
# Vulkan - Intel GPU
|
||||
|
||||
After installing `nixVulkanIntel`.
|
||||
|
||||
```bash
|
||||
$ sudo apt install mesa-vulkan-drivers
|
||||
...
|
||||
$ nixVulkanIntel $(nix-build '<nixpkgs>' --no-out-link -A vulkan-tools)/bin/vulkaninfo | grep VkPhysicalDeviceProperties -A 7
|
||||
VkPhysicalDeviceProperties:
|
||||
===========================
|
||||
apiVersion = 0x400036 (1.0.54)
|
||||
driverVersion = 71311368 (0x4402008)
|
||||
vendorID = 0x8086
|
||||
deviceID = 0x591b
|
||||
deviceType = INTEGRATED_GPU
|
||||
deviceName = Intel(R) HD Graphics 630 (Kaby Lake GT2)
|
||||
```
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
## Nvidia auto detection does not work
|
||||
|
||||
```bash
|
||||
building '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv'...
|
||||
pcregrep: Failed to open /proc/driver/nvidia/version: No such file or directory
|
||||
builder for '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv' failed with exit code 2
|
||||
error: build of '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv' faile
|
||||
```
|
||||
|
||||
You can run the Nvidia installer using an explicit version string instead of the automatic detection method:
|
||||
|
||||
```bash
|
||||
nix-build -A auto.nixGLNvidia --argstr nvidiaVersion 440.82
|
||||
```
|
||||
|
||||
(or `nixGLNvidiaBumblebee`, `nixVulkanNividia`)
|
||||
|
||||
|
||||
The version of your driver can be found using `glxinfo` from your system default package manager, or `nvidia-settings`.
|
||||
|
||||
## On nixOS
|
||||
|
||||
`nixGL` can also be used on nixOS if the system is installed with a different
|
||||
nixpkgs clone than the one your application are installed with. Override the
|
||||
`pkgs` argument of the script with the correct nixpkgs clone:
|
||||
|
||||
```bash
|
||||
nix-build ./default.nix -A nixGLIntel --arg pkgs "import path_to_your_nixpkgs {}".
|
||||
```
|
||||
|
||||
## Old nvidia drivers
|
||||
|
||||
Users of Nvidia legacy driver should use the `backport/noGLVND` branch. This branch is not tested and may not work well, please open a bug report, it will be taken care of as soon as possible.
|
||||
|
||||
# `nixGLCommon`
|
||||
|
||||
`nixGLCommon nixGLXXX` can be used to get `nixGL` executable which fallback to `nixGLXXX`. It is a shorter name for people with only one OpenGL configuration.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
nix-build -E "with import ./default.nix {}; nixGLCommon nixGLIntel"
|
||||
```
|
||||
|
||||
# Limitations
|
||||
|
||||
`nixGL` is badly tested, mostly because it is difficult to test automatically in a continuous integration context because you need access to different type of hardware.
|
||||
|
||||
Some OpenGL configurations may not work, for example AMD proprietary drivers. There is no fundamental limitation, so if you want support for theses configurations, open an issue.
|
||||
|
||||
# Hacking
|
||||
|
||||
One great way to contribute to nixGL is to run the test suite. Just run
|
||||
`./Test.hs` in the main directory and check that all the test relevant to your
|
||||
hardware are green.
|
|
@ -1,110 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i runhaskell -p "haskellPackages.ghcWithPackages(p: with p; [hspec process])" -p nix
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
import Test.Hspec
|
||||
import System.Process
|
||||
import qualified Data.Text as Text
|
||||
import Data.Text (Text)
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Data.List (find)
|
||||
|
||||
-- nixos-19-09 is used so hopefully it will have a different libc than
|
||||
-- the current `<nixpkgs>` used in a current nixOS system, so it will trigger the
|
||||
-- driver failure.
|
||||
-- Run `./Test.hs --match "/Sanity/"` to ensure that non wrapped
|
||||
-- binaries fails on NixOS.
|
||||
|
||||
currentChannel = "channel:nixos-19.09-small"
|
||||
|
||||
-- | Utils function: run a command and returns its output.
|
||||
processOutput p args = Text.strip . Text.pack <$> readCreateProcess ((proc (Text.unpack p) (Text.unpack <$> args)) { std_err = Inherit }) ""
|
||||
|
||||
-- * OpenGL
|
||||
|
||||
-- | Returns the path to the nixGLXXX binary.
|
||||
getNixGLBin version = (<>("/bin/"<>version)) <$> processOutput "nix-build" ["./", "-A", version, "-I", "nixpkgs=" <> currentChannel]
|
||||
|
||||
-- | Returns the vendor string associated with a glxinfo wrapped by a nixGL.
|
||||
getVendorString io = do
|
||||
output <- Text.lines <$> io
|
||||
pure $ Text.unpack <$> find ("OpenGL version string"`Text.isPrefixOf`) output
|
||||
|
||||
-- | Checks that a nixGL wrapper works with glxinfo 32 & 64 bits.
|
||||
checkOpenGL_32_64 glxinfo32 glxinfo64 vendorName nixGLName = do
|
||||
beforeAll (getNixGLBin nixGLName) $ do
|
||||
it "32 bits" $ \nixGLBin -> do
|
||||
Just vendorString <- getVendorString (processOutput nixGLBin [glxinfo32, "-B"])
|
||||
vendorString `shouldContain` vendorName
|
||||
|
||||
it "64 bits" $ \nixGLBin -> do
|
||||
Just vendorString <- getVendorString (processOutput nixGLBin [glxinfo64, "-B"])
|
||||
vendorString `shouldContain` vendorName
|
||||
|
||||
-- * Vulkan
|
||||
|
||||
-- | Heuristic to detect if vulkan work. `driverName` must appears in the output
|
||||
checkVulkanIsWorking io = do
|
||||
res <- io
|
||||
res `shouldSatisfy` ("driverName"`Text.isInfixOf`)
|
||||
|
||||
-- | Checks that a nixGL wrapper works with glxinfo 32 & 64 bits.
|
||||
checkVulkan_32_64 vulkaninfo32 vulkaninfo64 vendorName nixGLName = do
|
||||
beforeAll (getNixGLBin nixGLName) $ do
|
||||
it "32 bits" $ \nixGLBin -> do
|
||||
checkVulkanIsWorking (processOutput nixGLBin [vulkaninfo32])
|
||||
|
||||
it "64 bits" $ \nixGLBin -> do
|
||||
checkVulkanIsWorking (processOutput nixGLBin [vulkaninfo64])
|
||||
|
||||
|
||||
main = do
|
||||
putStrLn "Running tests for nixGL"
|
||||
putStrLn "It can take a while, this will build and test all drivers in the background"
|
||||
glxinfo64 <- (<>"/bin/glxinfo") <$> processOutput "nix-build" [currentChannel, "-A", "glxinfo"]
|
||||
glxinfo32 <- (<>"/bin/glxinfo") <$> processOutput "nix-build" [currentChannel, "-A", "pkgsi686Linux.glxinfo"]
|
||||
|
||||
vulkaninfo64 <- (<>"/bin/vulkaninfo") <$> processOutput "nix-build" [currentChannel, "-A", "vulkan-tools"]
|
||||
vulkaninfo32 <- (<>"/bin/vulkaninfo") <$> processOutput "nix-build" [currentChannel, "-A", "pkgsi686Linux.vulkan-tools"]
|
||||
|
||||
let checkOpenGL = checkOpenGL_32_64 glxinfo32 glxinfo64
|
||||
checkVulkan = checkVulkan_32_64 vulkaninfo32 vulkaninfo64
|
||||
|
||||
hspec $ do
|
||||
-- This category ensure that tests are failing if not run with nixGL
|
||||
-- This allows testing on nixOS
|
||||
describe "Sanity" $ do
|
||||
describe "OpenGL" $ do
|
||||
it "fails with unwrapped glxinfo64" $ do
|
||||
vendorString <- getVendorString (processOutput glxinfo64 ["-B"])
|
||||
vendorString `shouldBe` Nothing
|
||||
|
||||
it "fails with unwrapped glxinfo32" $ do
|
||||
vendorString <- getVendorString (processOutput glxinfo32 ["-B"])
|
||||
vendorString `shouldBe` Nothing
|
||||
describe "Vulkan" $ do
|
||||
it "fails with unwrapped vulkaninfo64" $ do
|
||||
processOutput vulkaninfo64 [] `shouldThrow` anyIOException
|
||||
|
||||
it "fails with unwrapped vulkaninfo32" $ do
|
||||
processOutput vulkaninfo32 [] `shouldThrow` anyIOException
|
||||
|
||||
describe "NixGL" $ do
|
||||
describe "Mesa" $ do
|
||||
describe "OpenGL" $ do
|
||||
checkOpenGL "Mesa" "nixGLIntel"
|
||||
describe "Vulkan" $ do
|
||||
checkVulkan "Mesa" "nixVulkanIntel"
|
||||
|
||||
describe "Nvidia - Bumblebee" $ do
|
||||
describe "OpenGL" $ do
|
||||
checkOpenGL "NVIDIA" "nixGLNvidiaBumblebee"
|
||||
xdescribe "Vulkan" $ do
|
||||
-- Not tested: I don't have the hardware (@guibou)
|
||||
checkVulkan "NVIDIA" "nixVulkanNvidiaBumblebee"
|
||||
|
||||
-- TODO: check Nvidia (I don't have this hardware)
|
||||
describe "Nvidia" $ do
|
||||
describe "OpenGL" $ do
|
||||
checkOpenGL "NVIDIA" "nixGLNvidia"
|
||||
describe "Vulkan" $ do
|
||||
checkVulkan "NVIDIA" "nixVulkanNvidia"
|
|
@ -1,25 +0,0 @@
|
|||
let
|
||||
pkgs = import ./nixpkgs.nix {config = {allowUnfree = true;};};
|
||||
|
||||
pure = pkgs.recurseIntoAttrs (pkgs.callPackage ./nixGL.nix {
|
||||
nvidiaVersion = "440.82";
|
||||
nvidiaHash = "edd415acf2f75a659e0f3b4f27c1fab770cf21614e84a18152d94f0d004a758e";
|
||||
});
|
||||
|
||||
versionFile440 = pkgs.callPackage ./nixGL.nix {
|
||||
nvidiaVersionFile = pkgs.writeText "nvidia-version-440.82" ''
|
||||
NVRM version: NVIDIA UNIX x86_64 Kernel Module 440.82 Wed Apr 1 20:04:33 UTC 2020
|
||||
GCC version: gcc version 9.3.0 (Arch Linux 9.3.0-1)
|
||||
'';
|
||||
};
|
||||
|
||||
versionFile510 = pkgs.callPackage ./nixGL.nix {
|
||||
nvidiaVersionFile = pkgs.writeText "nvidia-version-510.54" ''
|
||||
NVRM version: NVIDIA UNIX x86_64 Kernel Module 510.54 Wed Apr 1 20:04:33 UTC 2020
|
||||
GCC version: gcc version 9.3.0 (Arch Linux 9.3.0-1)
|
||||
'';
|
||||
};
|
||||
in
|
||||
(with pure; [nixGLIntel nixVulkanNvidia nixGLNvidia nixVulkanIntel])
|
||||
++ (with versionFile440.auto; [nixGLNvidia nixGLDefault nixVulkanNvidia])
|
||||
++ (with versionFile510.auto; [nixGLNvidia nixGLDefault nixVulkanNvidia])
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
## Nvidia informations.
|
||||
# Version of the system kernel module. Let it to null to enable auto-detection.
|
||||
nvidiaVersion ? null,
|
||||
# Hash of the Nvidia driver .run file. null is fine, but fixing a value here
|
||||
# will be more reproducible and more efficient.
|
||||
nvidiaHash ? null,
|
||||
# Alternatively, you can pass a path that points to a nvidia version file
|
||||
# and let nixGL extract the version from it. That file must be a copy of
|
||||
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
|
||||
# https://github.com/NixOS/nix/issues/3539 ).
|
||||
nvidiaVersionFile ? null,
|
||||
# Enable 32 bits driver
|
||||
# This is on by default, you can switch it to off if you want to reduce a
|
||||
# bit the size of nixGL closure.
|
||||
enable32bits ? true,
|
||||
# Make sure to enable config.allowUnfree to the instance of nixpkgs to be
|
||||
# able to access the nvidia drivers.
|
||||
pkgs ?
|
||||
import <nixpkgs> {
|
||||
config = {allowUnfree = true;};
|
||||
},
|
||||
# Enable all Intel specific extensions which only works on x86_64
|
||||
enableIntelX86Extensions ? true,
|
||||
}:
|
||||
pkgs.callPackage ./nixGL.nix ({
|
||||
inherit
|
||||
nvidiaVersion
|
||||
nvidiaVersionFile
|
||||
nvidiaHash
|
||||
enable32bits
|
||||
;
|
||||
}
|
||||
// (
|
||||
if enableIntelX86Extensions
|
||||
then {}
|
||||
else {
|
||||
intel-media-driver = null;
|
||||
vaapiIntel = null;
|
||||
}
|
||||
))
|
|
@ -1,81 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# execution: fetch.py >nvidia_versions.json
|
||||
|
||||
import http.client
|
||||
import json
|
||||
import sys
|
||||
|
||||
NV_FREE_X86_URL = "download.nvidia.com"
|
||||
POTENTIAL_SHA256_EXTS = [".sha256sum", ".sha256"]
|
||||
RIGHT_PAD = " " * 20
|
||||
|
||||
conn = http.client.HTTPSConnection(NV_FREE_X86_URL)
|
||||
conn.request("GET", "/XFree86/Linux-x86_64/")
|
||||
response = conn.getresponse()
|
||||
dir_html = response.read()
|
||||
|
||||
assert (response.status < 400), "Error occurred fetching for source from"
|
||||
|
||||
def scrape_driver_versions(dir_html: bytes):
|
||||
# The idea is to recursively follows all interesting `src` from `<a href={src}>`
|
||||
def _rec(dir_html: bytes, href_url_start: int = 0, so_far: list[str] = []) -> list[str]:
|
||||
MATCH_START = b"<span class=\'dir\'><a href=\'"
|
||||
href_url_start = dir_html.find(MATCH_START, href_url_start)
|
||||
if href_url_start == -1: # EOF
|
||||
return so_far
|
||||
|
||||
# version href should start with a number
|
||||
potential_version_start = href_url_start + len(MATCH_START)
|
||||
p = potential_version_start
|
||||
if not (dir_html[p: p+1].decode().isnumeric()):
|
||||
return _rec(dir_html, potential_version_start, so_far)
|
||||
|
||||
version_end = dir_html.find(b"/", potential_version_start)
|
||||
assert version_end != -1, "Should have end-signaling /"
|
||||
so_far.append(dir_html[potential_version_start:version_end].decode())
|
||||
return _rec(dir_html, version_end, so_far)
|
||||
|
||||
versions = _rec(dir_html, 0, [])
|
||||
num_versions = len(versions)
|
||||
for i, version in enumerate(versions):
|
||||
print(f"[{i+1}/{num_versions}] Processing version {version}{RIGHT_PAD}", end="\r", file=sys.stderr)
|
||||
yield version
|
||||
print()
|
||||
|
||||
versions = scrape_driver_versions(dir_html)
|
||||
|
||||
download_urls_of = lambda ver: [f"/XFree86/Linux-x86_64/{ver}/NVIDIA-Linux-x86_64-{ver}.run"]
|
||||
sha256_urls_of = lambda ver: [
|
||||
f"{url}{dl_ext}"
|
||||
for dl_ext in POTENTIAL_SHA256_EXTS
|
||||
for url in download_urls_of(ver)
|
||||
]
|
||||
|
||||
def sha256_of(version: str) -> str | None:
|
||||
if int(version.split(".")[0]) < 256:
|
||||
# Has 3 different packages that we should probably not bother
|
||||
return None
|
||||
for url in sha256_urls_of(version):
|
||||
conn = http.client.HTTPSConnection(NV_FREE_X86_URL)
|
||||
conn.request("GET", url)
|
||||
response = conn.getresponse()
|
||||
if response.status < 400:
|
||||
return response.read().decode().split()[0]
|
||||
print(f"No sha256 for {version}{RIGHT_PAD}", file=sys.stderr)
|
||||
return None
|
||||
|
||||
def fetch(version: str):
|
||||
dl_url = download_urls_of(version)[0]
|
||||
sha256 = sha256_of(version)
|
||||
return (version, dl_url, sha256)
|
||||
|
||||
fetch_data = [fetch(v) for v in versions]
|
||||
fetch_data.append(("latest", *fetch_data[-1][1:]))
|
||||
|
||||
# now print the JSON object
|
||||
print(json.dumps({
|
||||
version: {
|
||||
"url": f"https://{NV_FREE_X86_URL}{dl_url}",
|
||||
"sha256": sha256
|
||||
} for (version, dl_url, sha256) in fetch_data if sha256 is not None}, indent=4))
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1660551188,
|
||||
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
description = "A wrapper tool for nix OpenGL applications";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
isIntelX86Platform = system == "x86_64-linux";
|
||||
nix_pkgs = import nixpkgs {inherit system;};
|
||||
pkgs = import ./default.nix {
|
||||
pkgs = nix_pkgs;
|
||||
enable32bits = isIntelX86Platform;
|
||||
enableIntelX86Extensions = isIntelX86Platform;
|
||||
};
|
||||
in rec {
|
||||
packages = {
|
||||
# makes it easy to use "nix run nixGL --impure -- program"
|
||||
default = pkgs.auto.nixGLDefault;
|
||||
|
||||
nixGLDefault = pkgs.auto.nixGLDefault;
|
||||
nixGLNvidia = pkgs.auto.nixGLNvidia;
|
||||
nixGLNvidiaBumblebee = pkgs.auto.nixGLNvidiaBumblebee;
|
||||
nixGLIntel = pkgs.nixGLIntel;
|
||||
nixVulkanNvidia = pkgs.auto.nixVulkanNvidia;
|
||||
nixVulkanIntel = pkgs.nixVulkanIntel;
|
||||
};
|
||||
|
||||
# deprecated attributes for retro compatibility
|
||||
defaultPackage = packages;
|
||||
}))
|
||||
// rec {
|
||||
# deprecated attributes for retro compatibility
|
||||
overlay = overlays.default;
|
||||
overlays.default = final: _: let
|
||||
isIntelX86Platform = final.system == "x86_64-linux";
|
||||
in {
|
||||
nixgl = import ./default.nix {
|
||||
pkgs = final;
|
||||
enable32bits = isIntelX86Platform;
|
||||
enableIntelX86Extensions = isIntelX86Platform;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,293 +0,0 @@
|
|||
{
|
||||
# # Nvidia informations.
|
||||
# Version of the system kernel module. Let it to null to enable auto-detection.
|
||||
nvidiaVersion ? null,
|
||||
# Hash of the Nvidia driver .run file. null is fine, but fixing a value here
|
||||
# will be more reproducible and more efficient.
|
||||
nvidiaHash ? null,
|
||||
# Alternatively, you can pass a path that points to a nvidia version file
|
||||
# and let nixGL extract the version from it. That file must be a copy of
|
||||
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
|
||||
# https://github.com/NixOS/nix/issues/3539 ).
|
||||
nvidiaVersionFile ? null,
|
||||
# Enable 32 bits driver
|
||||
# This is one by default, you can switch it to off if you want to reduce a
|
||||
# bit the size of nixGL closure.
|
||||
enable32bits ? true,
|
||||
writeTextFile,
|
||||
shellcheck,
|
||||
pcre,
|
||||
runCommand,
|
||||
linuxPackages,
|
||||
fetchurl,
|
||||
lib,
|
||||
runtimeShell,
|
||||
bumblebee,
|
||||
libglvnd,
|
||||
vulkan-validation-layers,
|
||||
mesa,
|
||||
libvdpau-va-gl,
|
||||
intel-media-driver,
|
||||
vaapiIntel,
|
||||
pkgsi686Linux,
|
||||
driversi686Linux,
|
||||
zlib,
|
||||
libdrm,
|
||||
xorg,
|
||||
wayland,
|
||||
gcc,
|
||||
}: let
|
||||
writeExecutable = {
|
||||
name,
|
||||
text,
|
||||
}:
|
||||
writeTextFile {
|
||||
inherit name text;
|
||||
|
||||
executable = true;
|
||||
destination = "/bin/${name}";
|
||||
|
||||
checkPhase = ''
|
||||
${shellcheck}/bin/shellcheck "$out/bin/${name}"
|
||||
|
||||
# Check that all the files listed in the output binary exists
|
||||
for i in $(${pcre}/bin/pcregrep -o0 '/nix/store/.*?/[^ ":]+' $out/bin/${name})
|
||||
do
|
||||
ls $i > /dev/null || (echo "File $i, referenced in $out/bin/${name} does not exists."; exit -1)
|
||||
done
|
||||
'';
|
||||
};
|
||||
fetch_db = builtins.fromJSON (builtins.readFile ./nvidia_versions.json);
|
||||
top = rec {
|
||||
/*
|
||||
It contains the builder for different nvidia configuration, parametrized by
|
||||
the version of the driver and sha256 sum of the driver installer file.
|
||||
*/
|
||||
nvidiaPackages = {
|
||||
version,
|
||||
sha256 ? fetch_db."${version}".sha256,
|
||||
}: let
|
||||
nvidiaDrivers =
|
||||
(linuxPackages.nvidia_x11.override {}).overrideAttrs
|
||||
(oldAttrs: {
|
||||
pname = "nvidia";
|
||||
name = "nvidia-x11-${version}-nixGL";
|
||||
inherit version;
|
||||
src = let
|
||||
url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}.run";
|
||||
in
|
||||
fetchurl {inherit url sha256;};
|
||||
useGLVND = true;
|
||||
});
|
||||
nvidiaLibsOnly = nvidiaDrivers.override {
|
||||
libsOnly = true;
|
||||
kernel = null;
|
||||
};
|
||||
nixNvidiaWrapper = api:
|
||||
writeExecutable {
|
||||
name = "nix${api}Nvidia-${version}";
|
||||
text = ''
|
||||
#!${runtimeShell}
|
||||
${lib.optionalString (api == "Vulkan")
|
||||
"export VK_LAYER_PATH=${vulkan-validation-layers}/share/vulkan/explicit_layer.d"}
|
||||
NVIDIA_JSON=(${nvidiaLibsOnly}/share/glvnd/egl_vendor.d/*nvidia.json)
|
||||
${lib.optionalString enable32bits "NVIDIA_JSON32=(${nvidiaLibsOnly.lib32}/share/glvnd/egl_vendor.d/*nvidia.json)"}
|
||||
|
||||
${''export __EGL_VENDOR_LIBRARY_FILENAMES=''${NVIDIA_JSON[*]}${
|
||||
lib.optionalString enable32bits
|
||||
'':''${NVIDIA_JSON32[*]}''
|
||||
}"''${__EGL_VENDOR_LIBRARY_FILENAMES:+:$__EGL_VENDOR_LIBRARY_FILENAMES}"''}
|
||||
|
||||
${
|
||||
lib.optionalString (api == "Vulkan")
|
||||
''export VK_ICD_FILENAMES=${nvidiaLibsOnly}/share/vulkan/icd.d/nvidia_icd.json${
|
||||
lib.optionalString enable32bits
|
||||
":${nvidiaLibsOnly.lib32}/share/vulkan/icd.d/nvidia_icd.json"
|
||||
}"''${VK_ICD_FILENAMES:+:$VK_ICD_FILENAMES}"''
|
||||
}
|
||||
export LD_LIBRARY_PATH=${
|
||||
lib.makeLibraryPath ([libglvnd nvidiaLibsOnly]
|
||||
++ lib.optional (api == "Vulkan") vulkan-validation-layers
|
||||
++ lib.optionals enable32bits [
|
||||
nvidiaLibsOnly.lib32
|
||||
pkgsi686Linux.libglvnd
|
||||
])
|
||||
}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
exec "$@"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
inherit nvidiaDrivers nvidiaLibsOnly;
|
||||
|
||||
nixGLNvidiaBumblebee = writeExecutable {
|
||||
name = "nixGLNvidiaBumblebee-${version}";
|
||||
text = ''
|
||||
#!${runtimeShell}
|
||||
export LD_LIBRARY_PATH=${
|
||||
lib.makeLibraryPath [nvidiaDrivers]
|
||||
}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
${
|
||||
bumblebee.override {
|
||||
nvidia_x11 = nvidiaDrivers;
|
||||
nvidia_x11_i686 = nvidiaDrivers.lib32;
|
||||
}
|
||||
}/bin/optirun --ldpath ${
|
||||
lib.makeLibraryPath ([libglvnd nvidiaDrivers]
|
||||
++ lib.optionals enable32bits [
|
||||
nvidiaDrivers.lib32
|
||||
pkgsi686Linux.libglvnd
|
||||
])
|
||||
} "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
# TODO: 32bit version? Not tested.
|
||||
inherit nixNvidiaWrapper;
|
||||
|
||||
# TODO: 32bit version? Not tested.
|
||||
nixGLNvidia = nixNvidiaWrapper "GL";
|
||||
|
||||
# TODO: 32bit version? Not tested.
|
||||
nixVulkanNvidia = nixNvidiaWrapper "Vulkan";
|
||||
};
|
||||
|
||||
nixGLIntel = writeExecutable {
|
||||
name = "nixGLIntel";
|
||||
# add the 32 bits drivers if needed
|
||||
text = let
|
||||
mesa-drivers =
|
||||
[mesa.drivers]
|
||||
++ lib.optional enable32bits pkgsi686Linux.mesa.drivers;
|
||||
intel-driver =
|
||||
[intel-media-driver vaapiIntel]
|
||||
# Note: intel-media-driver is disabled for i686 until https://github.com/NixOS/nixpkgs/issues/140471 is fixed
|
||||
++ lib.optionals enable32bits [
|
||||
/*
|
||||
pkgsi686Linux.intel-media-driver
|
||||
*/
|
||||
driversi686Linux.vaapiIntel
|
||||
];
|
||||
libvdpau =
|
||||
[libvdpau-va-gl]
|
||||
++ lib.optional enable32bits pkgsi686Linux.libvdpau-va-gl;
|
||||
glxindirect = runCommand "mesa_glxindirect" {} ''
|
||||
mkdir -p $out/lib
|
||||
ln -s ${mesa.drivers}/lib/libGLX_mesa.so.0 $out/lib/libGLX_indirect.so.0
|
||||
'';
|
||||
in ''
|
||||
#!${runtimeShell}
|
||||
export LIBGL_DRIVERS_PATH=${lib.makeSearchPathOutput "lib" "lib/dri" mesa-drivers}
|
||||
export LIBVA_DRIVERS_PATH=${lib.makeSearchPathOutput "out" "lib/dri" intel-driver}
|
||||
${''export __EGL_VENDOR_LIBRARY_FILENAMES=${mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json${
|
||||
lib.optionalString enable32bits
|
||||
":${pkgsi686Linux.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json"
|
||||
}"''${__EGL_VENDOR_LIBRARY_FILENAMES:+:$__EGL_VENDOR_LIBRARY_FILENAMES}"''}
|
||||
export LD_LIBRARY_PATH=${lib.makeLibraryPath mesa-drivers}:${lib.makeSearchPathOutput "lib" "lib/vdpau" libvdpau}:${glxindirect}/lib:${lib.makeLibraryPath [libglvnd]}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
exec "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
nixVulkanIntel = writeExecutable {
|
||||
name = "nixVulkanIntel";
|
||||
text = let
|
||||
# generate a file with the listing of all the icd files
|
||||
icd = runCommand "mesa_icd" {} (
|
||||
# 64 bits icd
|
||||
''
|
||||
ls ${mesa.drivers}/share/vulkan/icd.d/*.json > f
|
||||
''
|
||||
# 32 bits ones
|
||||
+ lib.optionalString enable32bits ''
|
||||
ls ${pkgsi686Linux.mesa.drivers}/share/vulkan/icd.d/*.json >> f
|
||||
''
|
||||
# concat everything as a one line string with ":" as seperator
|
||||
+ ''cat f | xargs | sed "s/ /:/g" > $out''
|
||||
);
|
||||
in ''
|
||||
#!${runtimeShell}
|
||||
if [ -n "$LD_LIBRARY_PATH" ]; then
|
||||
echo "Warning, nixVulkanIntel overwriting existing LD_LIBRARY_PATH" 1>&2
|
||||
fi
|
||||
export VK_LAYER_PATH=${vulkan-validation-layers}/share/vulkan/explicit_layer.d
|
||||
ICDS=$(cat ${icd})
|
||||
export VK_ICD_FILENAMES=$ICDS"''${VK_ICD_FILENAMES:+:$VK_ICD_FILENAMES}"
|
||||
export LD_LIBRARY_PATH=${
|
||||
lib.makeLibraryPath [
|
||||
zlib
|
||||
libdrm
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
xorg.libxshmfence
|
||||
wayland
|
||||
gcc.cc
|
||||
]
|
||||
}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
exec "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
nixGLCommon = nixGL:
|
||||
runCommand "nixGL" {} ''
|
||||
mkdir -p "$out/bin"
|
||||
# star because nixGLNvidia... have version prefixed name
|
||||
cp ${nixGL}/bin/* "$out/bin/nixGL";
|
||||
'';
|
||||
|
||||
auto = let
|
||||
_nvidiaVersionFile =
|
||||
if nvidiaVersionFile != null
|
||||
then nvidiaVersionFile
|
||||
else
|
||||
# HACK: Get the version from /proc. It turns out that /proc is mounted
|
||||
# inside of the build sandbox and varies from machine to machine.
|
||||
#
|
||||
# builtins.readFile is not able to read /proc files. See
|
||||
# https://github.com/NixOS/nix/issues/3539.
|
||||
runCommand "impure-nvidia-version-file"
|
||||
{
|
||||
# To avoid sharing the build result over time or between machine,
|
||||
# Add an impure parameter to force the rebuild on each access.
|
||||
# time = builtins.currentTime;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
} "cp /proc/driver/nvidia/version $out 2> /dev/null || touch $out";
|
||||
|
||||
# The nvidia version. Either fixed by the `nvidiaVersion` argument, or
|
||||
# auto-detected. Auto-detection is impure.
|
||||
nvidiaVersionAuto =
|
||||
if nvidiaVersion != null
|
||||
then nvidiaVersion
|
||||
else
|
||||
# Get if from the nvidiaVersionFile
|
||||
let
|
||||
data = builtins.readFile _nvidiaVersionFile;
|
||||
versionMatch = builtins.match ".*Module ([0-9.]+) .*" data;
|
||||
in
|
||||
if versionMatch != null
|
||||
then builtins.head versionMatch
|
||||
else null;
|
||||
|
||||
autoNvidia = nvidiaPackages {version = nvidiaVersionAuto;};
|
||||
in
|
||||
rec {
|
||||
# The output derivation contains nixGL which point either to
|
||||
# nixGLNvidia or nixGLIntel using an heuristic.
|
||||
nixGLDefault =
|
||||
if nvidiaVersionAuto != null
|
||||
then nixGLCommon autoNvidia.nixGLNvidia
|
||||
else nixGLCommon nixGLIntel;
|
||||
}
|
||||
// autoNvidia;
|
||||
};
|
||||
in
|
||||
top
|
||||
// (
|
||||
if nvidiaVersion != null
|
||||
then
|
||||
top.nvidiaPackages
|
||||
{
|
||||
version = nvidiaVersion;
|
||||
sha256 = nvidiaHash;
|
||||
}
|
||||
else {}
|
||||
)
|
|
@ -1,7 +0,0 @@
|
|||
let
|
||||
rev = "4f6d8095fd51";
|
||||
in
|
||||
import (fetchTarball {
|
||||
url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz";
|
||||
sha256 = "14sm0bjjcmi9qmznwy3nkd2vbhj5xcshgm54a5wiprl9ssvxqw53";
|
||||
})
|
|
@ -1,599 +0,0 @@
|
|||
|
||||
{
|
||||
"256.25": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.25/NVIDIA-Linux-x86_64-256.25.run",
|
||||
"sha256": "a93e4de6df8336741ace5a4bd2bc80b3b0b0ebde8c31003671af91bc44db61d3"
|
||||
},
|
||||
"256.29": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.29/NVIDIA-Linux-x86_64-256.29.run",
|
||||
"sha256": "e387780b265e9eec2f68295f7f08dab0238c87426e9968d8dd9d02d6ff023da3"
|
||||
},
|
||||
"256.35": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.35/NVIDIA-Linux-x86_64-256.35.run",
|
||||
"sha256": "ef10ecddd8db11f0fa3c6e4727dc275eb0ca9d23a7b7d37a038d17d2a42acb2a"
|
||||
},
|
||||
"256.38.02": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.38.02/NVIDIA-Linux-x86_64-256.38.02.run",
|
||||
"sha256": "c3c9c60932830a648034b98f38910058df339a84ad5998adc8df19c697fd6663"
|
||||
},
|
||||
"256.38.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.38.03/NVIDIA-Linux-x86_64-256.38.03.run",
|
||||
"sha256": "0dcb0098e294d5b89f57b8100f6af660225310ba48b4298a2ac79bb19cc8ca7c"
|
||||
},
|
||||
"256.44": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.44/NVIDIA-Linux-x86_64-256.44.run",
|
||||
"sha256": "528aaed18b6b4ba79dbf4ae5c5ecda8350007d610d2c7c608eb646739cfeb500"
|
||||
},
|
||||
"256.52": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.52/NVIDIA-Linux-x86_64-256.52.run",
|
||||
"sha256": "3ab713f969fe7cf0d7ccfdfee2863c92ea96d1eb5bf3f734b3a1e5b37c2611c8"
|
||||
},
|
||||
"256.53": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/256.53/NVIDIA-Linux-x86_64-256.53.run",
|
||||
"sha256": "febee3eb128e1d62565fccb3ad1577f741c4bf067072e45e7766ab999aa590c9"
|
||||
},
|
||||
"260.19.04": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.04/NVIDIA-Linux-x86_64-260.19.04.run",
|
||||
"sha256": "09391b63daa6bc08ea520c28295a8535b83710f8ba48d01778bf7fe22d095485"
|
||||
},
|
||||
"260.19.06": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.06/NVIDIA-Linux-x86_64-260.19.06.run",
|
||||
"sha256": "ecd3e2113fbf9dd7e167c737d3b4490dd653b49b70ead62c194635ffc3fd4d00"
|
||||
},
|
||||
"260.19.12": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.12/NVIDIA-Linux-x86_64-260.19.12.run",
|
||||
"sha256": "7cc90b5bd402742167a1647d0d92aa997af4184da614c2ca882afb2f2e48eb7e"
|
||||
},
|
||||
"260.19.21": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.21/NVIDIA-Linux-x86_64-260.19.21.run",
|
||||
"sha256": "bf80147e94ab4c86dffe4529635e5f5b0caff5f6758a068d0e2d95ee466d2214"
|
||||
},
|
||||
"260.19.26": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.26/NVIDIA-Linux-x86_64-260.19.26.run",
|
||||
"sha256": "78ce4e3344ee15330708054b5c3ceabb96aabaa1194a9bc92cee9559c7cd3c9f"
|
||||
},
|
||||
"260.19.29": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.29/NVIDIA-Linux-x86_64-260.19.29.run",
|
||||
"sha256": "09461a1eb6f46b394e9a2cfef20448311a395c3969521881b334c413715174eb"
|
||||
},
|
||||
"260.19.36": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.36/NVIDIA-Linux-x86_64-260.19.36.run",
|
||||
"sha256": "35a8769585e1f9b426c9c21b5f5898c06251a642ed73e9fb9eea9ab87ef91067"
|
||||
},
|
||||
"260.19.44": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/260.19.44/NVIDIA-Linux-x86_64-260.19.44.run",
|
||||
"sha256": "8526267407d71b1257e43abc2b98e588c8d271e30584a754b8b8ef426cc69c64"
|
||||
},
|
||||
"270.18": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.18/NVIDIA-Linux-x86_64-270.18.run",
|
||||
"sha256": "b10af40db402f9f8e6a3a5a55b2385a06e2b8b14c8fc539624b07c63d70bef32"
|
||||
},
|
||||
"270.26": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.26/NVIDIA-Linux-x86_64-270.26.run",
|
||||
"sha256": "120ead8941ad6c9ea5bc263e12b004e6c4639151469cfe46a99781ab1cc1f33a"
|
||||
},
|
||||
"270.29": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.29/NVIDIA-Linux-x86_64-270.29.run",
|
||||
"sha256": "c45209b72b2a0128fa4721c616dd51ad799e2698d46f672b006c4b2cc0c44f9c"
|
||||
},
|
||||
"270.30": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.30/NVIDIA-Linux-x86_64-270.30.run",
|
||||
"sha256": "5f49d1497c60ea3d82e6640ebc233e05c855adf5f6702dfc0a5c73773f26207e"
|
||||
},
|
||||
"270.41.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.41.03/NVIDIA-Linux-x86_64-270.41.03.run",
|
||||
"sha256": "35dd4a1d89228a8ffc26dd9513aaf806e67826c42ff34954e2bd576068abd0b5"
|
||||
},
|
||||
"270.41.06": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.41.06/NVIDIA-Linux-x86_64-270.41.06.run",
|
||||
"sha256": "825c593e77d33df599b2cfe2a3b4cde0c61b837a843a3caa6469298de721f2fa"
|
||||
},
|
||||
"270.41.19": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/270.41.19/NVIDIA-Linux-x86_64-270.41.19.run",
|
||||
"sha256": "4d7131f07e739abc787d69696ca4ac52df2fc0b338405ffd474288c2a4a1e7a6"
|
||||
},
|
||||
"275.09": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.09/NVIDIA-Linux-x86_64-275.09.run",
|
||||
"sha256": "e4c94cbd85f619c2b83f6c53bddc8a7b7ce306f28b80c8cfacdfba884da45f4d"
|
||||
},
|
||||
"275.09.04": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.09.04/NVIDIA-Linux-x86_64-275.09.04.run",
|
||||
"sha256": "dceb415aec70d7fa2bafea45268b1913100cc19e08e57dfda0f0920caad43b68"
|
||||
},
|
||||
"275.09.07": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.09.07/NVIDIA-Linux-x86_64-275.09.07.run",
|
||||
"sha256": "747c09b0a0a8d60e1b5fee49fb1ea07ee5812f8e85a87b2403011af6de58164d"
|
||||
},
|
||||
"275.19": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.19/NVIDIA-Linux-x86_64-275.19.run",
|
||||
"sha256": "58bf5d90fbabd30c5980a8ce5fe831337ccfe0ab843e78e0b0b12eec8e327e40"
|
||||
},
|
||||
"275.21": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.21/NVIDIA-Linux-x86_64-275.21.run",
|
||||
"sha256": "9e071aef05545ece8f2836b57f49f73853adb998f9987669c4803549fb50f479"
|
||||
},
|
||||
"275.28": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.28/NVIDIA-Linux-x86_64-275.28.run",
|
||||
"sha256": "fc1dfded42d21b08f40fa7f50589c6c0c4922cc0d30af71bf721ab8682b00648"
|
||||
},
|
||||
"275.36": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.36/NVIDIA-Linux-x86_64-275.36.run",
|
||||
"sha256": "91a8c8865514fbeec20fa90c00690011426ad7b5d5c9a221f7ced253d94ddab7"
|
||||
},
|
||||
"275.43": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/275.43/NVIDIA-Linux-x86_64-275.43.run",
|
||||
"sha256": "468515a3b3fb2423dc47a6066e2f1b646ec78283b008a3702c111e5cfd3f5dc2"
|
||||
},
|
||||
"280.04": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/280.04/NVIDIA-Linux-x86_64-280.04.run",
|
||||
"sha256": "e230b25462ab4eeba71363f12360d4785223c023111f08d21ce1a7456665e712"
|
||||
},
|
||||
"280.11": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/280.11/NVIDIA-Linux-x86_64-280.11.run",
|
||||
"sha256": "9d56c08c45a0648c62f00745413f0828549928f0e4e7549bea3d9fce8e498e5f"
|
||||
},
|
||||
"280.13": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/280.13/NVIDIA-Linux-x86_64-280.13.run",
|
||||
"sha256": "98a08c7d943912a178a9bbe419db60634088e5262ae9053bf2fe730984e5a012"
|
||||
},
|
||||
"285.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/285.03/NVIDIA-Linux-x86_64-285.03.run",
|
||||
"sha256": "fc1e895635b9ea7171f4e7c549e6502f3853838cb4cc254a190b004579a1f919"
|
||||
},
|
||||
"285.05.09": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/285.05.09/NVIDIA-Linux-x86_64-285.05.09.run",
|
||||
"sha256": "7159a1f7e898b50dd49ea2273ac6facb870546ad5496bf70c6fbe1642d2c4970"
|
||||
},
|
||||
"290.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/290.03/NVIDIA-Linux-x86_64-290.03.run",
|
||||
"sha256": "14a412b6a01cd9ae98b1dba0f1a2805c9038fd731dd66747ca57ab6ec4f550b0"
|
||||
},
|
||||
"290.06": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/290.06/NVIDIA-Linux-x86_64-290.06.run",
|
||||
"sha256": "48df72cd225043ebecbe1a6a9a575d692e0a9fa0b0bb65c037800d83ba54f3ec"
|
||||
},
|
||||
"290.10": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/290.10/NVIDIA-Linux-x86_64-290.10.run",
|
||||
"sha256": "34a2ab07f4ae7afdeb2c8415f3f37c1099e6690eb25f3dbef92eca771f7ce4cd"
|
||||
},
|
||||
"295.09": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.09/NVIDIA-Linux-x86_64-295.09.run",
|
||||
"sha256": "4b2ff7f9fcc1db6f30f4b4a2eb5a22bc5fe1c566828e3d6a56ef088d187bf786"
|
||||
},
|
||||
"295.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.17/NVIDIA-Linux-x86_64-295.17.run",
|
||||
"sha256": "b1fede162dce9c3d31a991cf48a4743dacece05cfef86dafac8e8284369a86c2"
|
||||
},
|
||||
"295.20": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.20/NVIDIA-Linux-x86_64-295.20.run",
|
||||
"sha256": "3b84fdeae335c047193f68a1da26f2a736461c35cfe94566fc7ace1e5762d34c"
|
||||
},
|
||||
"295.33": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.33/NVIDIA-Linux-x86_64-295.33.run",
|
||||
"sha256": "4e939bac1ebc03c6439969d638540b99900b0fe4e4799b4186e5ff9521d37b73"
|
||||
},
|
||||
"295.40": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.40/NVIDIA-Linux-x86_64-295.40.run",
|
||||
"sha256": "f6d5ae338b3b8ac6c512d06b335010934a62728f181a1fa5253aa84b7bf45e7a"
|
||||
},
|
||||
"295.49": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.49/NVIDIA-Linux-x86_64-295.49.run",
|
||||
"sha256": "61dc9623ea1981f801d97de7c67c32b7e4f7ef4aaa6744910967cb634d9ace62"
|
||||
},
|
||||
"295.53": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.53/NVIDIA-Linux-x86_64-295.53.run",
|
||||
"sha256": "4525e994a0d0a8cd776415401423e7de3985923637642955c3fe50a3d047d4ca"
|
||||
},
|
||||
"295.59": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.59/NVIDIA-Linux-x86_64-295.59.run",
|
||||
"sha256": "4b1d96389abd2b804ad470c5189142a02ee4c82c1ac56cea37ecb45e8051313e"
|
||||
},
|
||||
"295.71": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.71/NVIDIA-Linux-x86_64-295.71.run",
|
||||
"sha256": "956c7660bff61c07a99cea2130e73baf1574907008d41d9462147aad6b83dcc6"
|
||||
},
|
||||
"295.75": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/295.75/NVIDIA-Linux-x86_64-295.75.run",
|
||||
"sha256": "b7ae04da001ade59b87abd15e7786b3f0fc75a312368fa466f6c0400e803debd"
|
||||
},
|
||||
"302.07": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/302.07/NVIDIA-Linux-x86_64-302.07.run",
|
||||
"sha256": "6a9e515c21afed122621a69a844a2891bb625773e481ebfe70699bf2d06be5e1"
|
||||
},
|
||||
"302.11": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/302.11/NVIDIA-Linux-x86_64-302.11.run",
|
||||
"sha256": "e44816814bce58a9f1cf0d10edec1a2f4b25104a212714c2bbd1bc9e70b53f61"
|
||||
},
|
||||
"302.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/302.17/NVIDIA-Linux-x86_64-302.17.run",
|
||||
"sha256": "5cf9059ebb70ade99e5621c0a605ed5bbb6c274f7c52a7ef40342ceb41b381fc"
|
||||
},
|
||||
"304.22": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.22/NVIDIA-Linux-x86_64-304.22.run",
|
||||
"sha256": "4c1b6f7dcda007622bb5e243b858abdb3881d5d5befdc617b23393545d9c96fd"
|
||||
},
|
||||
"304.30": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.30/NVIDIA-Linux-x86_64-304.30.run",
|
||||
"sha256": "ada4deee8a7a19093af7bb724dfd55e2594fb28932ff915723532ddf16b85e1f"
|
||||
},
|
||||
"304.32": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.32/NVIDIA-Linux-x86_64-304.32.run",
|
||||
"sha256": "a26d6c64108371027fbca1b35b182d0ff1609dd53ce6f9d06fea85f039393bc8"
|
||||
},
|
||||
"304.37": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.37/NVIDIA-Linux-x86_64-304.37.run",
|
||||
"sha256": "cae75158047d0b97ea48f269fd2903a6731f53b978a1065720343436c97ca9c2"
|
||||
},
|
||||
"304.43": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.43/NVIDIA-Linux-x86_64-304.43.run",
|
||||
"sha256": "76946e2fe4160cfd59e7a75fefd174a9c7e71c51cca6b88c40a16cf35947b777"
|
||||
},
|
||||
"304.48": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.48/NVIDIA-Linux-x86_64-304.48.run",
|
||||
"sha256": "c018541d30e4f276e1afc60077e5c75b54954daa8888c870fc80a19b28d4eae8"
|
||||
},
|
||||
"304.51": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.51/NVIDIA-Linux-x86_64-304.51.run",
|
||||
"sha256": "28654ff26923660de7296488054154bbbac0ef6e669377eeed84178fd0c17e64"
|
||||
},
|
||||
"304.60": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.60/NVIDIA-Linux-x86_64-304.60.run",
|
||||
"sha256": "12dbd2661e8b6114fa3f531cb0c7a6820c98198aa6044bddff0d2431141bc6d0"
|
||||
},
|
||||
"304.64": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.64/NVIDIA-Linux-x86_64-304.64.run",
|
||||
"sha256": "b3c3bb7f136ccd978c9c5a511a02199ec2498c4243baae19ac68e5d905ca5340"
|
||||
},
|
||||
"304.84": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.84/NVIDIA-Linux-x86_64-304.84.run",
|
||||
"sha256": "8d51e0a8e5bd20d0add5dbacdcdb95eba05bc01d17c3bb247b5a1880feb0e0fe"
|
||||
},
|
||||
"304.88": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.88/NVIDIA-Linux-x86_64-304.88.run",
|
||||
"sha256": "c1a73211566b085214b0ad1824733aa56d09c6139f729feebd0eff44f6113da3"
|
||||
},
|
||||
"304.108": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.108/NVIDIA-Linux-x86_64-304.108.run",
|
||||
"sha256": "56a61871f0488521f50c04607c568a177cad48a577c0f4ca625665d0015e2b39"
|
||||
},
|
||||
"304.116": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.116/NVIDIA-Linux-x86_64-304.116.run",
|
||||
"sha256": "3f267f2cd3f4ede4f954c5f36c8427ae4a2fa19ca8c275f892488f4dc3a4109a"
|
||||
},
|
||||
"304.117": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.117/NVIDIA-Linux-x86_64-304.117.run",
|
||||
"sha256": "0e5a751cf12b55057c00ccf53d05c8934d5eee49c5f8b3f33c5e11e2c6989e6e"
|
||||
},
|
||||
"304.119": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.119/NVIDIA-Linux-x86_64-304.119.run",
|
||||
"sha256": "1fd710a78d2bf711ede3bcbd20058de1e94c498db31973dfec1b8c25bf87e6cd"
|
||||
},
|
||||
"304.121": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.121/NVIDIA-Linux-x86_64-304.121.run",
|
||||
"sha256": "6532eef8b6f65dc44ed912b4ffa86494a954ae98f53c3ffd394fa511cdf75928"
|
||||
},
|
||||
"304.123": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.123/NVIDIA-Linux-x86_64-304.123.run",
|
||||
"sha256": "68ee60d2a96ff80adad7e62f79f55f137dd10b8c38ce6c60fb481e73fdf6b155"
|
||||
},
|
||||
"304.125": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.125/NVIDIA-Linux-x86_64-304.125.run",
|
||||
"sha256": "c654889b85a18326f2c610260a8fbc3b1bb6f9b8be1c052a46a213f60bd62262"
|
||||
},
|
||||
"304.128": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/304.128/NVIDIA-Linux-x86_64-304.128.run",
|
||||
"sha256": "e301342b93af24a6676519cb3a7fbe5d557b6a23a588ef121478b7fbab8a495f"
|
||||
},
|
||||
"310.14": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.14/NVIDIA-Linux-x86_64-310.14.run",
|
||||
"sha256": "a187cc9de4939b171b600544e8dbf78dbb1a05cb481b2b3b506c3699f8e6c4c7"
|
||||
},
|
||||
"310.19": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.19/NVIDIA-Linux-x86_64-310.19.run",
|
||||
"sha256": "3326cf9eb432a10fee5cb663132cd6c175813d0225750ef237dcc7feefd20fca"
|
||||
},
|
||||
"310.32": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.32/NVIDIA-Linux-x86_64-310.32.run",
|
||||
"sha256": "e5f179a62d1a0e6a877f3f89315d0a28cb7c3cbceff7df13e1a71ab189ac3616"
|
||||
},
|
||||
"310.40": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.40/NVIDIA-Linux-x86_64-310.40.run",
|
||||
"sha256": "48fc9ff847b57ce959b401ad37040dc1332f9c0b3bdef08c246dba91e091a65e"
|
||||
},
|
||||
"310.44": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.44/NVIDIA-Linux-x86_64-310.44.run",
|
||||
"sha256": "585365fc37939794ab7ed6907ab2fd9fbcc6f4f19c003d21139895dc97dd88f4"
|
||||
},
|
||||
"310.51": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/310.51/NVIDIA-Linux-x86_64-310.51.run",
|
||||
"sha256": "4d0f9829105a8f06121f8308fa5e67834f52b84add48eaf4101b02522db15f53"
|
||||
},
|
||||
"313.09": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/313.09/NVIDIA-Linux-x86_64-313.09.run",
|
||||
"sha256": "11cc2c4d32da321ad7ce63b9cdb41578400542d0b9d0ac6c5061a3253db96e13"
|
||||
},
|
||||
"313.18": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/313.18/NVIDIA-Linux-x86_64-313.18.run",
|
||||
"sha256": "9aaf6ce2fb08f72b2ab4f7a2d9fc5af8216ac263fa4883deec3844f34ea7ba3a"
|
||||
},
|
||||
"313.26": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/313.26/NVIDIA-Linux-x86_64-313.26.run",
|
||||
"sha256": "4cbf3ec4fe1ce0b24ebbdcc3badde369aeb98ab59b6689261fa39f2dde00d41e"
|
||||
},
|
||||
"313.30": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/313.30/NVIDIA-Linux-x86_64-313.30.run",
|
||||
"sha256": "72317f2e4c459c33c764e3283deb3e1615b1852ead1f9bfad82148e120506022"
|
||||
},
|
||||
"319.12": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.12/NVIDIA-Linux-x86_64-319.12.run",
|
||||
"sha256": "4b68617d75d0d1149d2d6e836783429c715204fad567aa621ae7982df676a8d4"
|
||||
},
|
||||
"319.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.17/NVIDIA-Linux-x86_64-319.17.run",
|
||||
"sha256": "5579a8c4f5a7927eb9756d276c4e3d60540877cd68f6c946890fddc5d176764a"
|
||||
},
|
||||
"319.23": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.23/NVIDIA-Linux-x86_64-319.23.run",
|
||||
"sha256": "d130dd0a9d889063d0dbad0a27789af756076af879a68a5dbc1175821542fa78"
|
||||
},
|
||||
"319.32": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.32/NVIDIA-Linux-x86_64-319.32.run",
|
||||
"sha256": "204a00728c3cfbe3dcb12a9dae5bf0371a1e5b2c48dedf86a2bb6c881e901e2a"
|
||||
},
|
||||
"319.49": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.49/NVIDIA-Linux-x86_64-319.49.run",
|
||||
"sha256": "f4bfee9f48725e20e05439ee099730fb1b42892b9ecfac000180426b044be585"
|
||||
},
|
||||
"319.60": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.60/NVIDIA-Linux-x86_64-319.60.run",
|
||||
"sha256": "2bd663d0d0a9ae8769b0335ff282acfddea3cd86a3992970e445eb2f82fa1b04"
|
||||
},
|
||||
"319.72": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.72/NVIDIA-Linux-x86_64-319.72.run",
|
||||
"sha256": "25a15200d6fd58782db860c7bc0807583b1d78c13810013c024700e63df4c643"
|
||||
},
|
||||
"319.82": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/319.82/NVIDIA-Linux-x86_64-319.82.run",
|
||||
"sha256": "9e00555488fd1c934a86ccf04f3a9eb8c5bcbc29ea38ce66d72788d0bd9dde7b"
|
||||
},
|
||||
"325.08": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/325.08/NVIDIA-Linux-x86_64-325.08.run",
|
||||
"sha256": "83a567dc6b1ddd0c74af1ebc54e966ae19f52baa17166981046af4d6288c6ce4"
|
||||
},
|
||||
"325.15": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/325.15/NVIDIA-Linux-x86_64-325.15.run",
|
||||
"sha256": "01446fbd94f6eb3b2e1b3d3f2b06970bf470c3ee2cb1838b3d0c2416e6c74500"
|
||||
},
|
||||
"331.13": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.13/NVIDIA-Linux-x86_64-331.13.run",
|
||||
"sha256": "571741b8ea153281916382d287849f99a9fa65b911aa54d678b48ef0091cc0cd"
|
||||
},
|
||||
"331.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.17/NVIDIA-Linux-x86_64-331.17.run",
|
||||
"sha256": "22968b7bd6460456e99edcad18ec237ebe66fd19e349c9ec9c3d5a16c074eab4"
|
||||
},
|
||||
"331.20": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.20/NVIDIA-Linux-x86_64-331.20.run",
|
||||
"sha256": "b8803906402354d201d3b9bc21938a0fe8a7d76e93e486fddaab340df18092ec"
|
||||
},
|
||||
"331.38": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.38/NVIDIA-Linux-x86_64-331.38.run",
|
||||
"sha256": "1015ac65a85ba39bdbe9e6bac54ae7ce3b2441fc7512909074e991242a46cf34"
|
||||
},
|
||||
"331.49": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.49/NVIDIA-Linux-x86_64-331.49.run",
|
||||
"sha256": "ee0e0c3e95439e3d55e76aa6477fdb62bc62c04805b3efaa1f028ea64d2422f8"
|
||||
},
|
||||
"331.67": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.67/NVIDIA-Linux-x86_64-331.67.run",
|
||||
"sha256": "9c7f2bb44bb26a5effb915d8aa22132a6c06483e0cfa6f47b7265b15da83bbd7"
|
||||
},
|
||||
"331.79": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.79/NVIDIA-Linux-x86_64-331.79.run",
|
||||
"sha256": "c3314bd7f1f722929a2b401e12301a750ee7a73640518932a5a9af39c390a604"
|
||||
},
|
||||
"331.89": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.89/NVIDIA-Linux-x86_64-331.89.run",
|
||||
"sha256": "e7f51a6c7abfe3ba8f03dbb284e2ade7430cc909b2241ff7703b17beff0dd237"
|
||||
},
|
||||
"331.104": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.104/NVIDIA-Linux-x86_64-331.104.run",
|
||||
"sha256": "e0a26dc4444e84dae876db773f717e33846e1ae8a23802795ba3d39f1631f79e"
|
||||
},
|
||||
"331.113": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/331.113/NVIDIA-Linux-x86_64-331.113.run",
|
||||
"sha256": "e9d5eb4394ef31825f7a86290b19b522851d1b599284095d81bac0f33a996219"
|
||||
},
|
||||
"334.16": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/334.16/NVIDIA-Linux-x86_64-334.16.run",
|
||||
"sha256": "59a930f7ed6391a1e57b9fc7683420facd1c4548757d4120b1c594479af759f7"
|
||||
},
|
||||
"334.21": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/334.21/NVIDIA-Linux-x86_64-334.21.run",
|
||||
"sha256": "dd35011967b815e096c267f80b36664e34d779bc33017f396dabbd1a1b86d057"
|
||||
},
|
||||
"337.12": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/337.12/NVIDIA-Linux-x86_64-337.12.run",
|
||||
"sha256": "8fa588e0491e652a1cfd45aa01be9336c9b5bb5dd54bf45801a40d53d957e4b4"
|
||||
},
|
||||
"337.19": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/337.19/NVIDIA-Linux-x86_64-337.19.run",
|
||||
"sha256": "bd6998c4aa5e491fb8fcb957b11dfb983ebfb755e938fce0382b006a7aba59d2"
|
||||
},
|
||||
"337.25": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/337.25/NVIDIA-Linux-x86_64-337.25.run",
|
||||
"sha256": "83280f7738f65bb2e790e7530a38978cf0bd0aa741eda51629c9e9b068128af0"
|
||||
},
|
||||
"340.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.17/NVIDIA-Linux-x86_64-340.17.run",
|
||||
"sha256": "b3311d4bc82dd1c58805f2ac29d20711f2b0c0978407bba138d603606e603662"
|
||||
},
|
||||
"340.24": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.24/NVIDIA-Linux-x86_64-340.24.run",
|
||||
"sha256": "db0f4f45ece587b95a8ceb0d1acf6f7f758a370ee0c4adfa2403ba4828d58ce6"
|
||||
},
|
||||
"340.32": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.32/NVIDIA-Linux-x86_64-340.32.run",
|
||||
"sha256": "ef96003110564953cad4ffaec073696dcf9652338dfe5eb0c58ae3ce45db42ac"
|
||||
},
|
||||
"340.46": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.46/NVIDIA-Linux-x86_64-340.46.run",
|
||||
"sha256": "57e7694b5a985ee95d2da37598ec37cdabf40f914490f4cdb0c5184f12a74270"
|
||||
},
|
||||
"340.58": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.58/NVIDIA-Linux-x86_64-340.58.run",
|
||||
"sha256": "70cc452161b969d659225a3a7d4cc17d5827f8f8ce6eb053757f30f6a666a643"
|
||||
},
|
||||
"340.65": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.65/NVIDIA-Linux-x86_64-340.65.run",
|
||||
"sha256": "cd3948db5c1e2468c50140efb4bb50f1a4c84c923db8ec756bd56ff35df9ff04"
|
||||
},
|
||||
"340.76": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.76/NVIDIA-Linux-x86_64-340.76.run",
|
||||
"sha256": "3bf670e9a2bdb184648dec54ce06fab65e798a9a4c9dd5155e2be4efee3e0994"
|
||||
},
|
||||
"340.93": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/340.93/NVIDIA-Linux-x86_64-340.93.run",
|
||||
"sha256": "ea2ac747fd473ea55ed5f6263bd314efa94c71384f3e03d527f8d550ba84c218"
|
||||
},
|
||||
"343.13": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/343.13/NVIDIA-Linux-x86_64-343.13.run",
|
||||
"sha256": "424a7d0fbf668c94454a140c880c298c71496ad7dee699a0bfc594c70e499e54"
|
||||
},
|
||||
"343.22": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/343.22/NVIDIA-Linux-x86_64-343.22.run",
|
||||
"sha256": "762e9d3c1253712a5a62f7052d58e4768eaea3f0492cab934dbf5349c8523315"
|
||||
},
|
||||
"343.36": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/343.36/NVIDIA-Linux-x86_64-343.36.run",
|
||||
"sha256": "2285efa2c0e6675d8724e47a09403630a674c32e514bdcfb54cec3c81810fc78"
|
||||
},
|
||||
"346.16": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.16/NVIDIA-Linux-x86_64-346.16.run",
|
||||
"sha256": "d44bc3f868ce9cbd6c5bbe88d8622f693ef44282f14ed018d150fcab21a0ce32"
|
||||
},
|
||||
"346.22": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.22/NVIDIA-Linux-x86_64-346.22.run",
|
||||
"sha256": "ecb3edab63ff053aa1d6e19eb0a69360075ab1b021e5181a6df738e29be9b71a"
|
||||
},
|
||||
"346.35": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.35/NVIDIA-Linux-x86_64-346.35.run",
|
||||
"sha256": "8625acbbc7a2abdda436a5cb9d06f2a7f5913b16e0a35ac4f9f106853a94d086"
|
||||
},
|
||||
"346.47": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.47/NVIDIA-Linux-x86_64-346.47.run",
|
||||
"sha256": "85ab28abe9defc2838839969b31aea647e0de34615fbfed3ba716205de365d0a"
|
||||
},
|
||||
"346.59": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.59/NVIDIA-Linux-x86_64-346.59.run",
|
||||
"sha256": "231020548431569c0172605815ba131a18f969966b4abf82129f974740bc64ca"
|
||||
},
|
||||
"346.72": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.72/NVIDIA-Linux-x86_64-346.72.run",
|
||||
"sha256": "2ae3777bcff6bf4883b6a903c82b82257bf8fc323fe174992df96a3208c50cef"
|
||||
},
|
||||
"346.82": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.82/NVIDIA-Linux-x86_64-346.82.run",
|
||||
"sha256": "f68b74479a2c329628fed061977e99f744980329c94b6e9c3f396714f2a10f0e"
|
||||
},
|
||||
"346.87": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.87/NVIDIA-Linux-x86_64-346.87.run",
|
||||
"sha256": "908446b20c9992cc6a7700866d36c13d9f53646837842d096d91b35644ee4e31"
|
||||
},
|
||||
"346.96": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/346.96/NVIDIA-Linux-x86_64-346.96.run",
|
||||
"sha256": "229b28a6b65965a248d07223d941de7d79b54cee7c6574f1037293e8a8026727"
|
||||
},
|
||||
"349.12": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/349.12/NVIDIA-Linux-x86_64-349.12.run",
|
||||
"sha256": "fe2e3be342859d2de947aed55c369f4944211ecde00435c76e50a4842fffd68a"
|
||||
},
|
||||
"349.16": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/349.16/NVIDIA-Linux-x86_64-349.16.run",
|
||||
"sha256": "f980b22729b20c9eb3a3a800af524da181afbc78e2409a3f83845894983f8322"
|
||||
},
|
||||
"352.09": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/352.09/NVIDIA-Linux-x86_64-352.09.run",
|
||||
"sha256": "a3ec271896b775c936e1a14e7af2e8ebf02b0bd59381217510185b313c5a5fd6"
|
||||
},
|
||||
"352.21": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/352.21/NVIDIA-Linux-x86_64-352.21.run",
|
||||
"sha256": "aadfbd991b5418cbf89d2368cc49485a4194196ef08362a18f92df049381f791"
|
||||
},
|
||||
"352.30": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/352.30/NVIDIA-Linux-x86_64-352.30.run",
|
||||
"sha256": "4c5fb75ba94c97b6d70ddb9ea2cb11b5ed01829b5f671d9e8abce7afba20aef5"
|
||||
},
|
||||
"352.41": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/352.41/NVIDIA-Linux-x86_64-352.41.run",
|
||||
"sha256": "0eb60d0543a0e7c5c3cfec13702005ffec6e2b8c7f22c631f324736ba2a1a832"
|
||||
},
|
||||
"355.06": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/355.06/NVIDIA-Linux-x86_64-355.06.run",
|
||||
"sha256": "898304e1455bbccad4a3da3520d7fe17db254413f3458d0a296b45fb9cf2bcd6"
|
||||
},
|
||||
"355.11": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/355.11/NVIDIA-Linux-x86_64-355.11.run",
|
||||
"sha256": "a59b425381add9d9058dc2d987bf3087ab59c43224b5eb04c3f273f5886451ed"
|
||||
},
|
||||
"470.161.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/470.161.03/NVIDIA-Linux-x86_64-470.161.03.run",
|
||||
"sha256": "5da82a7f8c76e781e7d7f0be7b798db4d344f26bd4facf9abcf3c71c71fe7640"
|
||||
},
|
||||
"470.182.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/470.182.03/NVIDIA-Linux-x86_64-470.182.03.run",
|
||||
"sha256": "3dbc1408fc48b865d3ddacefc45f4a3fc13b90b83a628ee546b0082ab2c3fc79"
|
||||
},
|
||||
"510.108.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/510.108.03/NVIDIA-Linux-x86_64-510.108.03.run",
|
||||
"sha256": "410a515e78df29c2cba4ac0b497889ce0ff1b04cfc711ff889e2dfc80f0da0d8"
|
||||
},
|
||||
"515.86.01": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/515.86.01/NVIDIA-Linux-x86_64-515.86.01.run",
|
||||
"sha256": "141777e1ca2f11e97d8d33260213f1be327eb73922ae22f4ddab404bb2ef4664"
|
||||
},
|
||||
"515.105.01": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/515.105.01/NVIDIA-Linux-x86_64-515.105.01.run",
|
||||
"sha256": "9dd2221f26c847c864dfe80cc8533f322c5f4dfaa2939cf54a934b8f7a2f6a0d"
|
||||
},
|
||||
"525.53": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.53/NVIDIA-Linux-x86_64-525.53.run",
|
||||
"sha256": "74bb0971f04f1dddd3c4641c891706fb96e8de52e22f6079e50de76d3a51687f"
|
||||
},
|
||||
"525.60.11": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.60.11/NVIDIA-Linux-x86_64-525.60.11.run",
|
||||
"sha256": "816ee6c2e0813ccc3d4a7958f71fc49a37c60efe1d51d6146c1ce72403983d5d"
|
||||
},
|
||||
"525.60.13": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.60.13/NVIDIA-Linux-x86_64-525.60.13.run",
|
||||
"sha256": "dce1c184f9f038be72237ccd29c66bb151077f6037f1c158c83d582bd2dba8ca"
|
||||
},
|
||||
"525.78.01": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.78.01/NVIDIA-Linux-x86_64-525.78.01.run",
|
||||
"sha256": "43da42d2bf69bc37ea9c7c0fa02f52db0dcc483c272f52edacad89a5cb495a93"
|
||||
},
|
||||
"525.85.05": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.85.05/NVIDIA-Linux-x86_64-525.85.05.run",
|
||||
"sha256": "ea63b4253403b224bb7313a8977a920dfe9d203d661dd5f6fc26585a70179140"
|
||||
},
|
||||
"525.89.02": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.89.02/NVIDIA-Linux-x86_64-525.89.02.run",
|
||||
"sha256": "0e412c88c5bd98f842a839a6f64614f20e4c0950ef7cffb12b158a71633593e9"
|
||||
},
|
||||
"525.105.17": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/525.105.17/NVIDIA-Linux-x86_64-525.105.17.run",
|
||||
"sha256": "c635a21a282c9b53485f19ebb64a0f4b536a968b94d4d97629e0bc547a58142a"
|
||||
},
|
||||
"530.30.02": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/530.30.02/NVIDIA-Linux-x86_64-530.30.02.run",
|
||||
"sha256": "47fddbbd7a22ba661923dbce6e7f51eec54df68050c406cc0490c3bfbede7963"
|
||||
},
|
||||
"530.41.03": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/530.41.03/NVIDIA-Linux-x86_64-530.41.03.run",
|
||||
"sha256": "ae27a16a968c85503f5d161dda343c1602612b025f4aee15f92e2ea0acb784b1"
|
||||
},
|
||||
"latest": {
|
||||
"url": "https://download.nvidia.com/XFree86/Linux-x86_64/530.41.03/NVIDIA-Linux-x86_64-530.41.03.run",
|
||||
"sha256": "ae27a16a968c85503f5d161dda343c1602612b025f4aee15f92e2ea0acb784b1"
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -15,46 +15,47 @@
|
|||
flake-utils,
|
||||
nixpkgs,
|
||||
}:
|
||||
with flake-utils; lib.eachSystem lib.defaultSystems (sys: let
|
||||
overlays = [turbo.overlay];
|
||||
# pkgs is our tweaked nixpkgs
|
||||
pkgs = import nixpkgs {
|
||||
system = sys;
|
||||
overlays = overlays;
|
||||
};
|
||||
shellMsg = ''
|
||||
echo "Hello from nix ${sys}"
|
||||
echo "Local development may use our remote planetscale database (pscale login && pnpm dev:infra; pnpm dev)"
|
||||
echo "Or from the specified docker-compose.yml (pnpm dev:local_infra && pnpm dev)"
|
||||
echo "See more on CONTRIBUTING.md"
|
||||
'';
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [pkgs.bashInteractive];
|
||||
buildInputs = [
|
||||
pkgs.nodejs-18_x
|
||||
pkgs.nodePackages.pnpm
|
||||
pkgs.nodePackages.prisma
|
||||
pkgs.prisma-engines
|
||||
pkgs.turbo
|
||||
# pkgs.turbo-tooling
|
||||
pkgs.jq
|
||||
pkgs.pscale
|
||||
pkgs.act # Github workflow
|
||||
];
|
||||
shellHook =
|
||||
# https://github.com/prisma/prisma/issues/3026#issuecomment-927258138
|
||||
# nix-direnv is required (impure build?) https://github.com/nix-community/nix-direnv
|
||||
''
|
||||
export PRISMA_MIGRATION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/migration-engine"
|
||||
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
|
||||
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
|
||||
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
|
||||
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
|
||||
export TURBO_BINARY_PATH="${pkgs.turbo}/bin/turbo"
|
||||
pnpm install
|
||||
''
|
||||
+ shellMsg;
|
||||
};
|
||||
});
|
||||
with flake-utils;
|
||||
lib.eachSystem lib.defaultSystems (sys: let
|
||||
overlays = [turbo.overlay];
|
||||
# pkgs is our tweaked nixpkgs
|
||||
pkgs = import nixpkgs {
|
||||
system = sys;
|
||||
overlays = overlays;
|
||||
};
|
||||
shellMsg = ''
|
||||
echo "Hello from nix ${sys}"
|
||||
echo "Local development may use our remote planetscale database (pscale login && pnpm dev:infra; pnpm dev)"
|
||||
echo "Or from the specified docker-compose.yml (pnpm dev:local_infra && pnpm dev)"
|
||||
echo "See more on CONTRIBUTING.md"
|
||||
'';
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [pkgs.bashInteractive];
|
||||
buildInputs = [
|
||||
pkgs.nodejs-18_x
|
||||
pkgs.nodePackages.pnpm
|
||||
pkgs.nodePackages.prisma
|
||||
pkgs.prisma-engines
|
||||
pkgs.turbo
|
||||
# pkgs.turbo-tooling
|
||||
pkgs.jq
|
||||
pkgs.pscale
|
||||
pkgs.act # Github workflow
|
||||
];
|
||||
shellHook =
|
||||
# https://github.com/prisma/prisma/issues/3026#issuecomment-927258138
|
||||
# nix-direnv is required (impure build?) https://github.com/nix-community/nix-direnv
|
||||
''
|
||||
export PRISMA_MIGRATION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/migration-engine"
|
||||
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
|
||||
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
|
||||
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
|
||||
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
|
||||
export TURBO_BINARY_PATH="${pkgs.turbo}/bin/turbo"
|
||||
pnpm install
|
||||
''
|
||||
+ shellMsg;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue