Skip to content

Latest commit

 

History

History
365 lines (310 loc) · 15.9 KB

NOTES.org

File metadata and controls

365 lines (310 loc) · 15.9 KB

NOTES

Notes

Commit Style

Adhere to Semantic Commit Messages

Code style

Useful Pointers

Overview (mindmap)

Flakes

eval

readOnlyPkgs

legacyPackages explained

Templates

devShells

Tips

nix store gc

Nixpkgs

Nix Registry

# the version of this flake used to build the system
  nix.registry.activeconfig.flake = self;
  environment.etc."nix/path/activeconfig".source = self;

Wrapping packages

Home Manager

Wayland under QEMU

dotfiles to Explore

Emacs

Doom

CheatSheet

Tip by @nilp0inter on how to ensure that the doom init script has git available

Install GitHub Copilot

Install ChatGPT

Install marksman

https://github.com/artempyanykh/marksman

doomPrivateDir

Seen on AUR/emacs29-git

emacs29-git/site-list-aot.md

To compile all site-lisp on demand (repos/AUR packages, ELPA, MELPA, whatever), add

(setq native-comp-deferred-compilation t)

to your `.emacs` file.

Or search the option in the editor’s GUI configuration, set it to true and save your `.emacs` file to add it to the file’s `custom-set-variables` array automatically.

As emacs-git changes its version everytime you compile a new binary, new eln files are generated for that particular binary and old versions will accumulate over time. To keep the eln-cache tidy, add this to your `.emacs` file:

(setq native-compile-prune-cache t)

To Review

Direct Simple Override

environment.systemPackages = [
  (pkgs.emacs.override {withPgtk = true;});
];

Global Override

nixpkgs.config.packageOverrides = pkgs: {
  emacs = pkgs.emacs.override {withPgtk = true;};
};

Global Override with Packages

{...}: let
  emacsWithPgtk = pkgs.emacs.override {withPgtk = true;};
  emacsWithPackages = (pkgs.emacsPackagesFor emacsWithPgtk).emacsWithPackages;
  customEmacs = emacsWithPackages (epkgs: with epkgs.melpaPackages; [magit pdf-tools vterm dracula-theme]);
in {
  # ...
    packages = with pkgs; [
    customEmacs
    emacs-all-the-icons-fonts
  ];
}

Iosevka

Using Nix Community’s Emacs Overlay

Things to Explore/Implement

NixOS Modules

Conditional imports

Flake framework

foot

swap

stylix

NixOS Generators

EasyEffects

NUR

Overlays with flake-parts

hyprland on nVidia

direnv

List of non-legacy software

OCR to clipboard

grim -g "$(slurp)" - | tesseract - - | wl-copy -

Sway (maybe applies to Hyprland)

Hardening

nixos-anywhere

console

kmscon

lib.getExe

trace: warning: getExe: Package “bat-0.23.0” does not have the meta.mainProgram attribute. We’ll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set meta.mainProgram in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don’t control its definition, specify the full path to the program, such as "${lib.getBin foo}/bin/bar".

IFD (Input From Derivation)