Skip to content

Instantly share code, notes, and snippets.

View Ultra980's full-sized avatar

Alex S. Ultra980

View GitHub Profile
@Ultra980
Ultra980 / log.txt
Created January 24, 2024 09:14
nvidia build failure log
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/a4yjk1w3jr2k8akmh4z5j88491abb992-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
@Ultra980
Ultra980 / flake.nix
Created December 8, 2023 20:00
A nix flake file that can run a dioxus app. Enter the nix devshell with `nix develop` and run the app with `cargo r`.
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem
(system:
let
@Ultra980
Ultra980 / asus-hotkey-run.sh
Last active June 19, 2023 09:49
A script to run certain commands when pressing a hotkey on ASUS laptop keyboards.
#!/usr/bin/env bash
# set -x # debug
# asus-hotkey-run - a script to run events on hotkey presses from ASUS laptops
# This is configured for the 2019 Zenbook Pro Duo, you should change this for your own laptop.
# (by hotkeys I mean those next to the power button, not fn+Fx)
# Huge thanks to OpenAI's ChatGPT, for writing most of this code :)
# The conversation that helped me write this script: https://chat.openai.com/share/c4a1915f-a90e-4357-b173-9be733ba3b10
@Ultra980
Ultra980 / configuration.nix
Created March 16, 2023 18:13
My NixOS configurations in a VM
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@Ultra980
Ultra980 / rustfmt.toml
Last active March 9, 2023 10:31
My rustfmt configuration
max_width = 100
hard_tabs = false
tab_spaces = 4
newline_style = "Auto"
indent_style = "Block"
use_small_heuristics = "Default"
fn_call_width = 60
attr_fn_like_width = 70
struct_lit_width = 18
struct_variant_width = 35
@Ultra980
Ultra980 / starship.toml
Created February 26, 2023 10:51
My starship prompt
format = """
[ ](bg:#4ab0bb)\
[ ](bg:#5bc0cc)\
[ ](bg:#6cd0dd)\
[ ](bg:#7de0ee)\
[   ](bg:#8ef0ff fg:#090c0c)\
[](bg:#1692a4 fg:#8ef0ff)\
$directory\
[](fg:#1692a4 bg:#006d7d)\
$git_branch\
@Ultra980
Ultra980 / prompt.txt
Last active June 19, 2023 09:45
nixOS manager prompt
Query: {insert query in script here}
Hi chatGPT. This prompt is part of a script used to manage a nixOS system. The query above is what the user asked from you. If the query is an action that can be done via the command line, such as updating the system, just return the command(s) to run in a shell, and no extra comments. Else, write `echo {answer}`, without the '`' and replacing {answer} with a short answer, of maximum one sentence, to what the user asked. The command for updating the system is `sudo nixos-rebuild switch`, without the '`'. The command for installing a package is `nix-env -iA {package name}`, without the '`' and replacing {package name} with the name of the package(s). If the query is `--help`, you will introduce yourself like you would answer a normal question (`echo {answer}`). It is very important to precisely follow these guidelines, otherwise the script will not work.