diff options
Diffstat (limited to 'src/content/pastebins/2018')
-rw-r--r-- | src/content/pastebins/2018/07/11/nix-pinning.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/13/guix-nixos-systemd.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/13/guixbuilder-nixos.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/13/guixbuilder.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/13/nix-strpad.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/25/nix-exps.adoc | 21 | ||||
-rw-r--r-- | src/content/pastebins/2018/07/25/nix-showdrv.adoc | 21 |
7 files changed, 28 insertions, 119 deletions
diff --git a/src/content/pastebins/2018/07/11/nix-pinning.adoc b/src/content/pastebins/2018/07/11/nix-pinning.adoc index 2d35e09..d4bc905 100644 --- a/src/content/pastebins/2018/07/11/nix-pinning.adoc +++ b/src/content/pastebins/2018/07/11/nix-pinning.adoc @@ -1,20 +1,7 @@ ---- += Nix pinning -title: Nix pinning - -date: 2018-07-11 - -layout: post - -lang: en - -eu_categories: nix - -ref: nix-pinning - ---- - -```nix +[source,nix] +---- let # Pin the nixpkgs version stdenv = pkgs.stdenv; @@ -35,4 +22,4 @@ in rec { patches = []; }; } -``` +---- diff --git a/src/content/pastebins/2018/07/13/guix-nixos-systemd.adoc b/src/content/pastebins/2018/07/13/guix-nixos-systemd.adoc index c2b8b62..729e981 100644 --- a/src/content/pastebins/2018/07/13/guix-nixos-systemd.adoc +++ b/src/content/pastebins/2018/07/13/guix-nixos-systemd.adoc @@ -1,20 +1,7 @@ ---- += GNU Guix systemd daemon for NixOS -title: GNU Guix systemd daemon for NixOS - -date: 2018-07-13 - -layout: post - -lang: en - -eu_categories: nix,guix - -ref: gnu-guix-systemd-daemon-for-nixos - ---- - -```nix +[source,nix] +---- # Derived from Guix guix-daemon.service.in # https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-daemon.service.in?id=00c86a888488b16ce30634d3a3a9d871ed6734a2 systemd.services.guix-daemon = { @@ -30,4 +17,4 @@ ref: gnu-guix-systemd-daemon-for-nixos }; wantedBy = [ "multi-user.target" ]; }; -``` +---- diff --git a/src/content/pastebins/2018/07/13/guixbuilder-nixos.adoc b/src/content/pastebins/2018/07/13/guixbuilder-nixos.adoc index 880d347..b000cd3 100644 --- a/src/content/pastebins/2018/07/13/guixbuilder-nixos.adoc +++ b/src/content/pastebins/2018/07/13/guixbuilder-nixos.adoc @@ -1,20 +1,7 @@ ---- += Guix users in NixOS system configuration -title: Guix users in NixOS system configuration - -date: 2018-07-13 - -layout: post - -lang: en - -eu_categories: nix,guix - -ref: guix-users-in-nixos-system-configuration - ---- - -```nix +[source,nix] +---- users = { mutableUsers = false; @@ -50,4 +37,4 @@ ref: guix-users-in-nixos-system-configuration name = "guixbuild"; }; }; -``` +---- diff --git a/src/content/pastebins/2018/07/13/guixbuilder.adoc b/src/content/pastebins/2018/07/13/guixbuilder.adoc index 82204a8..84e84d9 100644 --- a/src/content/pastebins/2018/07/13/guixbuilder.adoc +++ b/src/content/pastebins/2018/07/13/guixbuilder.adoc @@ -1,20 +1,7 @@ ---- += Guix builder user creation commands -title: Guix builder user creation commands - -date: 2018-07-13 - -layout: post - -lang: en - -eu_categories: guix - -ref: guix-builder-user-creation-commands - ---- - -```shell +[source,shell] +---- groupadd --system guixbuild for i in `seq -w 1 10`; do @@ -23,4 +10,4 @@ do -c "Guix build user $i" --system \ guixbuilder$i; done -``` +---- diff --git a/src/content/pastebins/2018/07/13/nix-strpad.adoc b/src/content/pastebins/2018/07/13/nix-strpad.adoc index 359bda5..0557b79 100644 --- a/src/content/pastebins/2018/07/13/nix-strpad.adoc +++ b/src/content/pastebins/2018/07/13/nix-strpad.adoc @@ -1,19 +1,6 @@ ---- += Nix string padding -title: Nix string padding - -date: 2018-07-13 - -layout: post - -lang: en - -eu_categories: nix - -ref: nix-string-padding - ---- - -```nix +[source,nix] +---- padString = (n: if n < 10 then "0" + toString n else toString n) -``` +---- diff --git a/src/content/pastebins/2018/07/25/nix-exps.adoc b/src/content/pastebins/2018/07/25/nix-exps.adoc index 23d75b6..824be69 100644 --- a/src/content/pastebins/2018/07/25/nix-exps.adoc +++ b/src/content/pastebins/2018/07/25/nix-exps.adoc @@ -1,20 +1,7 @@ ---- += Nix exps -title: Nix exps - -date: 2018-07-25 - -layout: post - -lang: en - -eu_categories: nix - -ref: nix-exps - ---- - -```nix +[source,nix] +---- let pkgsOriginal = import <nixpkgs> {}; pkgsSrc = pkgsOriginal.fetchzip { @@ -55,4 +42,4 @@ in rec { ''; }; } -``` +---- diff --git a/src/content/pastebins/2018/07/25/nix-showdrv.adoc b/src/content/pastebins/2018/07/25/nix-showdrv.adoc index 813965d..d7a2d9a 100644 --- a/src/content/pastebins/2018/07/25/nix-showdrv.adoc +++ b/src/content/pastebins/2018/07/25/nix-showdrv.adoc @@ -1,20 +1,7 @@ ---- += nix show-derivation sample output -title: nix show-derivation sample output - -date: 2018-07-25 - -layout: post - -lang: en - -eu_categories: nix - -ref: nix-show-derivation-sample-output - ---- - -```nix +[source,nix] +---- $ nix show-derivation /nix/store/zzz9cl2ly0mb2njr7vwa5528fxmn29m8-combofont-0.2.drv { "/nix/store/zzz9cl2ly0mb2njr7vwa5528fxmn29m8-combofont-0.2.drv": { @@ -83,4 +70,4 @@ $ nix show-derivation /nix/store/zzz9cl2ly0mb2njr7vwa5528fxmn29m8-combofont-0.2. } } } -``` +---- |