about summary refs log tree commit diff
path: root/ops/nixos/default.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-11 r/2482 refactor(ops): Split //ops/nixos into different locationsVincent Ambo1-61/+0
Splits //ops/nixos into: * //ops/nixos.nix - utility functions for building systems * //ops/machines - shared machine definitions (read by readTree) * //ops/modules - shared NixOS modules (skipped by readTree) This simplifies working with the configuration fixpoint in whitby, and is overall a bit more in line with how NixOS systems in user folders currently work. Change-Id: I1322ec5cc76c0207c099c05d44828a3df0b3ffc1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2931 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-10 r/2470 refactor: Move nixpkgs attribute to `third_party.nixpkgs`Vincent Ambo1-4/+2
Please read b/108 to make sense of this. This gets rid of the explicit list of exposed packages from nixpkgs, and instead makes the entire package set available at `third_party.nixpkgs`. To accommodate this, a LOT of things have to be very slightly shuffled around. Some of this was done in already submitted CLs, but this change is unfortunately still quite noisy. Pay extra attention to: * overlay-like functionality that was partially moved to actual overlays (partially as in, the minimum required to get a green build) * modified uses of the package set path, esp. in NixOS systems Special notes: * xanthous has been disabled in CI because of issues with the Haskell overlay * //third_party/nix has been disabled because of other unclear dependency issues Both of these will be tackled in a followup CL. Change-Id: I2f9c60a4d275fdb5209264be0addfd7e06c53118 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2910 Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-04-10 r/2464 refactor(ops): Consistent use of depot.third_party vs. pkgsVincent Ambo1-5/+4
In preparation for the solution of b/108, we need to consistently use `depot.third_party` for packages that are only packed in the TVL depot and `pkgs` for things that come from nixpkgs. This commit cleans up a huge chunk of these uses in //ops Change-Id: I00faeb969eaa70760a26256274925b07998c2351 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2915 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-02 r/2409 chore(ops/nixos): finish removal of depot.nixLuke Granger-Brown1-2/+0
All user configs and modules have been migrated to using the depot module parameter. All hail the hypnotoad. Change-Id: Ic05c61fccba3ac505a339283b6ef3105a2d0711c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2765 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-04-02 r/2404 refactor(ops/nixos): add "depot" argument to NixOS modulesLuke Granger-Brown1-5/+13
For the moment I've opted to not import all of the other things we'd usually provide to things imports via readTree, because I think it's a bit dangerous to accidentally overwrite things like NixOS' notion of "lib" with our own version. So for the moment, baseModule provides only "depot". Change-Id: I3db9132a3d9227055d4c1b00f02effcb84edcc53 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2760 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-11-22 r/1905 feat(ops/nixos): Give all nixoses a config.depotGriffin Smith1-1/+7
Add the depot.nix module and a depot config option to all nixos system derivations that're build through the `bin/rebuild-system` machinery. I can't imagine a scenario where we wouldn't want this level of integration. Change-Id: Ieeb98db2eee23919256adb4654bc45d540e055ec Reviewed-on: https://cl.tvl.fyi/c/depot/+/2128 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-08-31 r/1748 feat(ci): Add subtarget support for buildsVincent Ambo1-0/+1
We have naturally evolved a distinction between logical and physical targets. Physical targets are those which correspond directly to a tree location on disk and can be built with `-A path.to.files`, while logical targets are those that are exported from within an expression but do not have a corresponding file on disk. This change adds support for exporting logical targets from any tree location by adding a `meta.targets` attribute containing keys into itself, which will be consumed by the CI target gathering logic and included in the generated pipeline. Note that the labels for subtargets are syntactically different to emphasise that they do not correspond to a file location. For example, this change enables 'ops.nixos.whitbySystem' as a subtarget, which is labeled in CI as `ops/nixos:whitbySystem`. Change-Id: Ied09647a62c2ba98e3914548e3742ad422c63ecf Reviewed-on: https://cl.tvl.fyi/c/depot/+/1893 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-08-31 r/1747 feat(ops/pipelines): Dynamically generate CI pipeline from targetsVincent Ambo1-1/+1
Create the pipeline by outputting a file that contains nix-build invocations for each target's *derivation path*. Each invocation has a generated Nix expression passed to it with `-E` which fetches the correct target from the tree while correctly handling targets with strange characters (such as in Go-packages). This makes it possible to run target-level granular pipelines. We're getting somewhere! Change-Id: Ia6946e389dafd1d4926130bb8891446d6e17133b Reviewed-on: https://cl.tvl.fyi/c/depot/+/1855 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-08-26 r/1723 chore: Add __readTree attributes on systems that need to be builtVincent Ambo1-0/+6
This is a temporary state (TODO added) to be picked up by the new CI logic. Change-Id: Id4702740ffd18325088e2a8a0c6157a8cee7ccf7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1852 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-06 r/1221 feat(ops/nixos): Add generic rebuild-system scriptGriffin Smith1-2/+34
This adds a first crack at one idea for a generic, non-user-specific rebuild-system script to ops.nixos.rebuild-system. The idea here is that we enumerate all the nixos systems stored in the monorepo (similarly to what we do for ci-builds right now) then search through them by hostname to find the one matching the hostname of the current system, which is an attempt at a more generic version of tazjin's rebuilder script which does the same thing but with an explicit case block. As a caveat, it feels like there's a slight possibility that this way of finding systems is going to get slow to evaluate - on my system it feels fine but if it grows out of hand it's probably feasible to just bake this into the built script as a dynamically generated case statement. Change-Id: I2e4c5401913b6f4d936ab48ba2f95f96e0e78eb4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/894 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-07-02 r/1160 feat(nixos/whitby): Hello, World!Vincent Ambo1-0/+13
This adds NixOS configuration for the machine whitby.tvl.fyi. No interesting services are configured yet, so this configuration is quite plain. Change-Id: I67b7c75ebd6e298719b52e6b3bd83cc3be3c45d8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/843 Tested-by: BuildkiteCI Reviewed-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-13 r/941 refactor(ops/nixos): Move my NixOS configurations to //users/tazjinVincent Ambo1-47/+0
NixOS modules move one level up because it's unlikely that //ops/nixos will contain actual systems at this point (they're user-specific). This is the first users folder, so it is also added to the root readTree invocation for the repository. Change-Id: I546c701145fa204b7ba7518a8a56a783588629e0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/244 Reviewed-by: tazjin <mail@tazj.in>
2020-06-11 r/890 feat(ops/nixos): Initial NixOS configuration for frogVincent Ambo1-0/+5
This is mostly based on the nugget configuration, because frog replaces nugget.
2020-02-21 r/559 chore: Rename pkgs->depot in all Nix file headersVincent Ambo1-7/+5
2020-02-11 r/535 fix(ops/nixos): Add camden to rebuilder scriptVincent Ambo1-0/+4
This should probably be templated instead.
2020-02-11 r/534 feat(ops/nixos): Add initial configuration for host camdenVincent Ambo1-3/+4
2020-01-04 r/330 feat(ops/nixos): Add 'rebuilder' helper scriptVincent Ambo1-2/+26
This script rebuilds & activates system configuration based on the hostname. Currently since there is only one host this isn't particularly interesting.
2020-01-04 r/329 feat(ops/nixos): Check in updated system configuration for 'nugget'Vincent Ambo1-43/+10
This is the rebrand of the desktop machine, now running a config straight out of the depot.
2020-01-04 r/327 chore(ops/nixos): Move NixOS configuration one level upVincent Ambo1-0/+48