I'm interested in changing my configuration to use twist.nix instead of nixpkgs for Emacs packages. It took me a while to figure out how to get everything to build so I'd figure I'd just dump out the relevant Nix code in a gist for others to possibly use as a reference. This gist will not be maintained.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib3 | |
| import sys | |
| CACHE = "https://cache.nixos.org" | |
| visited: set[str] = set() | |
| def get_narinfo(hash) -> dict[str, str | list[str]]: | |
| resp = urllib3.request("GET", f"{CACHE}/{hash}.narinfo") | |
| if resp.status != 200: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| pkgs = import <nixpkgs> { }; | |
| inherit (pkgs) stdenv; | |
| in | |
| stdenv.mkDerivation { | |
| pname = "dell-u3223qe"; | |
| version = "m3t102"; | |
| src = ./Dell_U3223QE_FWUpdate_M3T102_Ubuntu.deb; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { stdenv | |
| , fetchFromGitHub | |
| , fetchpatch | |
| , pkg-config | |
| , cairo | |
| , xorg | |
| , clang | |
| , lib | |
| }: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pynixutil import drvparse | |
| from functools import wraps | |
| from typing import ( | |
| Optional, | |
| Callable, | |
| List, | |
| Set, | |
| ) | |
| import subprocess | |
| import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { melpaBuild | |
| , fetchFromGitHub | |
| , writeText | |
| , pkgs | |
| # Elisp dependencies | |
| , ctable | |
| , deferred | |
| , epc | |
| , s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| | Name | Value | Level of concern | | |
| | ---------------------------- | --------- | ------------------------------ | | |
| | Overall repository size | | | | |
| | * Commits | | | | |
| | * Count | 298 k | | | |
| | * Total size | 148 MiB | | | |
| | * Trees | | | | |
| | * Count | 1.58 M | * | | |
| | * Total size | 5.32 GiB | ** | | |
| | * Total tree entries | 159 M | *** | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use_nix() { | |
| eval "$(lorri direnv)" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace | |
| { config, lib, pkgs, ... }: | |
| { | |
| imports = [ | |
| <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix> | |
| ]; | |
| boot.kernelPackages = pkgs.linuxPackages_latest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace | |
| { config, lib, pkgs, ... }: | |
| { | |
| imports = [ | |
| <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix> | |
| ]; | |
| boot.kernelPackages = pkgs.linuxPackages_latest; |
NewerOlder