Skip to content

Instantly share code, notes, and snippets.

View asconix's full-sized avatar

Christoph Pilka asconix

  • Asconix Systems AS
  • Oslo, Norway
View GitHub Profile
sqlite> select * from script;
1|case "etc/pkg.conf.sample" in
/*) sample_file="etc/pkg.conf.sample" ;;
*) sample_file="/usr/local/etc/pkg.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/pkg.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
[root@archos:~]# nix-env -iA nixos.emacs
installing 'emacs-26.1'
these paths will be fetched (43.40 MiB download, 156.20 MiB unpacked):
/nix/store/1ahcyq0qm2y8ym6aifb3c6cr66i3ps59-libXmu-1.1.2
/nix/store/3747qj98ydfmiyvh9k6djg23zabsjwkr-libcroco-0.6.12
/nix/store/7gyfqf1f998xsh9w0fb65ygcrzgigrjx-libXt-1.1.5
/nix/store/91bbrsha808bzm4bivib2z062kmchb59-libXaw-1.0.13
/nix/store/j5pa9qikrvbxq2cccw0dfhpibqqdb17g-dconf-0.30.1-lib
/nix/store/n852qb4y74agni58hvhp8cdvbzms89xg-librsvg-2.44.12
/nix/store/nimvr3k240kpwsw72b3a2dvxvp5w3p07-emacs-26.1
ctp@archos ~> nix-env -iA nixos.almonds
installing 'almonds-1.25b'
these paths will be fetched (11.98 MiB download, 63.29 MiB unpacked):
/nix/store/5abwypmzy3zz6qqgzixdgz9dzacs2m9h-python3-3.7.4
/nix/store/6j2hw4d7fr84d6dnq7yjm5bdmm17qqb5-python3.7-Pillow-5.4.1
/nix/store/d02clh42g0zqhbkhyw8zwkd1xainm2v6-almonds-1.25b
/nix/store/k54w2bxrl4ws39nzyy8w0dyv2364559n-giflib-5.1.4
/nix/store/kfm35m57pxid7y7122qq5x8hzqf0w7h5-python3.7-setuptools-40.8.0
/nix/store/lm8p2y23lclhsj0r623glbqcpwchijzw-python3.7-olefile-0.46
/nix/store/mn8viqq3rya84psn478zswz5psqfg30p-lcms2-2.9
{ pkgs }:
with pkgs; with emacsPackagesNg;
let
emacsWithPackages = (emacsPackagesNgGen emacs).emacsWithPackages;
# As the EXWM README points out, XELB should be built from source if EXWM is.
xelb = melpaBuild {
pname = "xelb";
@asconix
asconix / nix-on-macos-catalina.md
Created August 19, 2021 13:01 — forked from chriselsner/nix-on-macos-catalina.md
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

@asconix
asconix / Moving_gpg_keys.txt
Created November 25, 2021 12:16 — forked from chrisswanda/Moving_gpg_keys.txt
Moving GPG keys to new machine
Mac and Linux work the same, storing the keys in ~/.gnupg. The safest way to transfer the files is using scp (part of ssh):
To copy from your local machine to another:
scp -rp ~/.gnupg othermachine:
To copy from a remote machine to your local:
scp -r othermachine:~/.gnupg ~
If you're on the machine that already has the key: