Commit graph

8 commits

Author SHA1 Message Date
William Carroll
59f7481411 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.
2020-08-20 11:26:31 +01:00
William Carroll
7833632a79 Attempt nix-build instead of nixos-rebuild switch
I've encountered a few problems with attempting to support nixos-rebuild:
- the activation step requires `sudo` privileges
- the `buildkite-agent` runs on the same machine, socrates, that is rebuilding
  itself. This means that when the activation step runs, it will attempt to
  restart `buildkite-agent` when the agent is still working

I'm slowly removing places in my nix code that rely on '<bracket>' notation, so
that I no longer depend on NIX_PATH being set. I still have more work to do.

{covid-uk,sandbox}/default.nix are breaking when I attempt to run my
build-socrates.sh script locally, so I'm temporarily disabling them until I can
get CI working as I expect.
2020-08-20 11:26:31 +01:00
William Carroll
c187d89f27 Rename socrates/default.nix -> socrates/configuration.nix
readTree uses the output attribute set of default.nix as the value for
nixos.socrates, which disables me from resolving nixos.socrates.rebuild since
there is no rebuild attribute in the output attribute set from default.nix.

If I rename default.nix -> configuration.nix, I can resolve
nixos.socrates.{configuration,hardware,rebuild}.
2020-03-07 16:17:23 +00:00
William Carroll
694ca4a85f Ensure socrates/default.nix is a function
Nix complains that `nixos.socrates` is not a function but a set. By adding
`{ ... }:` to the top of the file, I'm hoping to change it from a set to a
function.
2020-03-07 16:17:23 +00:00
William Carroll
5ba3f2b572 Attempt to serve {learn,blog}.wpcarro.dev
Reading an Nginx tutorial and trying to port the information over to NixOS.
2020-03-07 16:17:22 +00:00
William Carroll
431b4980e4 Remove fix-point recursion from socrates/default.nix
The fixed-point recursion isn't necessary.
2020-03-07 15:07:32 +00:00
William Carroll
6eb239dcce Manually require dependencies for <nixpkgs>, <briefcase>
When I build socrates using `sudo nixos-rebuild [...] switch`, my
`nixos-config` (i.e. <briefcase/nixos/socrates/default.nix>) is a simple Nix
anonymous function. Typically readTree populates my pkgs, briefcase, depot
function parameters with <nixpkgs>, <briefcase>, <depot>, but `nixos-rebuild` is
unaware of `readTree`.

For now I'm manually importing these dependencies, and I'm leaving a TODO to
reconsider switching to the `{ pkgs, briefcase, ... }` style when I better
understand NixOS.
2020-03-01 22:44:35 +00:00
William Carroll
fd720fbe4d Nest configuration beneath socrates directory
Create a socrates directory to store configuration for socrates.
2020-03-01 22:32:24 +00:00
Renamed from nixos/configuration.nix (Browse further)