diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-17T09·08+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-20T10·26+0100 |
commit | 59f74814111045b6d74d2a8f5b4f4bfbd1cacd85 (patch) | |
tree | d87397c2b1f32bdc1d3df0ab4d4f62d1cf065426 | |
parent | 7833632a7961038e8898ef287fd2dedf8fa7f33b (diff) |
Revise previous opinions about absolute paths GT <bracket-notation>
Unforeseen problem: `buildkite-agent` runs its builds in a separate directory, so if I want the `nix-build` command to build the newly checked out code, I need to set <briefcase> to the CWD.
-rw-r--r-- | assessments/dotted-squares/shell.nix | 2 | ||||
-rw-r--r-- | ci/scripts/build-socrates.sh | 3 | ||||
-rw-r--r-- | configs/.config/nixpkgs/home.nix | 2 | ||||
-rw-r--r-- | nixos/socrates/default.nix | 2 | ||||
-rw-r--r-- | nixos/socrates/hardware.nix | 2 | ||||
-rw-r--r-- | nixos/socrates/rebuild.nix | 11 | ||||
-rw-r--r-- | scratch/brilliant/default.nix | 2 | ||||
-rw-r--r-- | website/sandbox/learnpianochords/shell.nix | 3 | ||||
-rw-r--r-- | website/sandbox/learnpianochords/src/server/default.nix | 2 | ||||
-rw-r--r-- | website/sandbox/learnpianochords/src/server/shell.nix | 2 | ||||
-rw-r--r-- | zoo/shell.nix | 2 |
11 files changed, 12 insertions, 21 deletions
diff --git a/assessments/dotted-squares/shell.nix b/assessments/dotted-squares/shell.nix index 75a72cb7e0ba..87eb23d731e2 100644 --- a/assessments/dotted-squares/shell.nix +++ b/assessments/dotted-squares/shell.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in briefcase.buildHaskell.shell { deps = hpkgs: with hpkgs; [ hspec diff --git a/ci/scripts/build-socrates.sh b/ci/scripts/build-socrates.sh index f62f97e89951..6a9c48556f1f 100644 --- a/ci/scripts/build-socrates.sh +++ b/ci/scripts/build-socrates.sh @@ -1,6 +1,7 @@ set -euo pipefail nix-build /home/wpcarro/nixpkgs/nixos \ - -I nixos-config=/home/wpcarro/briefcase/nixos/socrates/default.nix \ + -I briefcase="$(pwd)" \ + -I nixos-config=nixos/socrates/default.nix \ -A system \ --show-trace diff --git a/configs/.config/nixpkgs/home.nix b/configs/.config/nixpkgs/home.nix index ee461dc9b33c..d23d04f6aa57 100644 --- a/configs/.config/nixpkgs/home.nix +++ b/configs/.config/nixpkgs/home.nix @@ -8,7 +8,7 @@ # I believe these calls depend on nixpkgs being set in NIX_PATH, which is a # dependency that I'm trying to prune... let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in { home = { packages = with pkgs; [ diff --git a/nixos/socrates/default.nix b/nixos/socrates/default.nix index d98cdb993300..ebb62036bd8f 100644 --- a/nixos/socrates/default.nix +++ b/nixos/socrates/default.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; pkgs = briefcase.third_party.pkgs; trimNewline = x: pkgs.lib.removeSuffix "\n" x; readSecret = x: trimNewline (builtins.readFile ("/etc/secrets/" + x)); diff --git a/nixos/socrates/hardware.nix b/nixos/socrates/hardware.nix index d13ffd7e401d..dde14eb1e627 100644 --- a/nixos/socrates/hardware.nix +++ b/nixos/socrates/hardware.nix @@ -5,7 +5,7 @@ { imports = - [ /home/wpcarro/nixpkgs/nixos/modules/installer/scan/not-detected.nix + [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; diff --git a/nixos/socrates/rebuild.nix b/nixos/socrates/rebuild.nix deleted file mode 100644 index 1ab4f5133d0b..000000000000 --- a/nixos/socrates/rebuild.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeShellScriptBin "rebuild" '' - set -ue - sudo nixos-rebuild \ - -I nixos-config=/home/wpcarro/briefcase/nixos/socrates/configuration.nix \ - -I nixpkgs=/home/wpcarro/nixpkgs \ - -I depot=/home/wpcarro/depot \ - -I briefcase=/home/wpcarro/briefcase \ - switch -'' diff --git a/scratch/brilliant/default.nix b/scratch/brilliant/default.nix index 5fba20d6704d..886ba87e1caf 100644 --- a/scratch/brilliant/default.nix +++ b/scratch/brilliant/default.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in briefcase.buildHaskell.program { name = "transform-keyboard"; srcs = builtins.path { diff --git a/website/sandbox/learnpianochords/shell.nix b/website/sandbox/learnpianochords/shell.nix index 6cc05d099177..1a9c967f7fea 100644 --- a/website/sandbox/learnpianochords/shell.nix +++ b/website/sandbox/learnpianochords/shell.nix @@ -1,5 +1,6 @@ let - pkgs = import /home/wpcarro/nixpkgs {}; + briefcase = import <briefcase> {}; + pkgs = briefcase.third_party.pkgs; in pkgs.mkShell { buildInputs = with pkgs; [ elmPackages.elm diff --git a/website/sandbox/learnpianochords/src/server/default.nix b/website/sandbox/learnpianochords/src/server/default.nix index 6ed68d4417f4..87de69cbd627 100644 --- a/website/sandbox/learnpianochords/src/server/default.nix +++ b/website/sandbox/learnpianochords/src/server/default.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in briefcase.buildHaskell.program { name = "server"; srcs = builtins.path { diff --git a/website/sandbox/learnpianochords/src/server/shell.nix b/website/sandbox/learnpianochords/src/server/shell.nix index a655c15871f9..ab470841e6c1 100644 --- a/website/sandbox/learnpianochords/src/server/shell.nix +++ b/website/sandbox/learnpianochords/src/server/shell.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in briefcase.buildHaskell.shell { deps = hpkgs: with hpkgs; [ hspec diff --git a/zoo/shell.nix b/zoo/shell.nix index 04655ada8830..944c5acc7f28 100644 --- a/zoo/shell.nix +++ b/zoo/shell.nix @@ -1,5 +1,5 @@ let - briefcase = import /home/wpcarro/briefcase {}; + briefcase = import <briefcase> {}; in briefcase.buildHaskell.shell { deps = hpkgs: with hpkgs; [ servant-server |