nix shell nixpkgs#postgresql -c psql -h ipaddress -U username -d dbname
cd /home/nixos/.nix-config/
nix run .#nixosConfigurations.DANIELKNB1.pkgs.home-manager.out -- expire-generations "$(date)"
nix-store --gc --print-roots | egrep -v "^(/nix/var|/run/\w+-system|\{memory|/proc)" | awk '{ print $1 }' | grep -vE 'home-manager|flake-registry\.json'
- https://github.com/nix-community/emacs-overlay/blob/7923757/elisp.nix#L21
extraEmacsPackages ? epkgs: [ ]
, usage:extraEmacsPackages = epkgs: with epkgs; [...];
- https://github.com/NixOS/nixpkgs/blob/980433df445ceadad8c446267dc5a9d029055239/pkgs/build-support/emacs/wrapper.nix#L9C1-L9C60
emacs.pkgs.withPackages (epkgs: [ epkgs.evil epkgs.magit ])
- https://github.com/NixOS/nixpkgs/blob/980433df445ceadad8c446267dc5a9d029055239/doc/packages/emacs.section.md?plain=1#L111
((emacsPackagesFor emacs).overrideScope overrides).withPackages (p: with p; []);
- https://github.com/nix-community/home-manager/blob/bfd0ae2/modules/programs/emacs.nix#L63
example = literalExpression "epkgs: [ epkgs.emms epkgs.magit ]";
nix-repl> :lf nixpkgs
Added 15 variables.
nix-repl> :t legacyPackages.x86_64-linux.emacs.pkgs.withPackages
a function
nix-repl> f = e: []
nix-repl> :t f
a function
nix-repl> :t (f {})
a list
f
can be any lambda as well.
extras > redigieren > export red. pdf
- see https://github.com/spikespaz/dotfiles: i. e.
nix eval 'github:spikespaz/dotfiles#nixosModules' --apply 'builtins.attrNames'
(setnixosModules
) nix eval .#devShells.aarch64-linux --apply 'builtins.attrNames'
nix eval .#nixosConfigurations.DANIELKNB1.config.virtualisation.docker --apply 'builtins.attrNames'
and with result list itemnix eval --raw .#nixosConfigurations.DANIELKNB1.config.virtualisation.docker.package
nix eval --json .#nixosConfigurations.DANIELKNB1.config.hardware.nvidia-container-toolkit.enable
nix eval github:nix-community/home-manager#lib.hm --apply 'builtins.attrNames'
nix eval nixpkgs#lib.types.types --apply 'builtins.attrNames'
i. e. url = "github:nix-community/nixos-wsl?ref=refs/pull/478/head";
nix develop --impure --expr 'let pkgs = import (builtins.getFlake "nixpkgs/master") {}; in pkgs.mkShell { buildInputs = with pkgs; [ lua luaPackages.http ]; }'
> ht = require'http.util'
> print(ht.dict_to_query({foo = "bar"; baz = "qux"})) --> "baz=qux&foo=bar"
baz=qux&foo=bar
https://discourse.nixos.org/t/using-nix-run-with-several-packages/25177/2
when master is not needed:
- https://github.com/search?q=repo%3Abbigras%2Fnix-config+emacs&type=code&p=2
- https://github.com/bbigras/nix-config/blob/36d88fd8015db4647f4975f04230a0d291bad1f5/users/bbigras/core/tmux.nix
- https://github.com/bbigras/nix-config/blob/36d88fd8015db4647f4975f04230a0d291bad1f5/core/tmux.nix
Problem statement:
-
ctrl-h v **hook
https://emacs.stackexchange.com/a/68710 -
https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Hooks.html
-
https://emacs.stackexchange.com/a/44585
M-x apropos-value eldoc-mode
NewerOlder