about summary refs log tree commit diff
path: root/users/glittershark
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-10T16·05+0200
committertazjin <mail@tazj.in>2021-04-10T21·18+0000
commit473604f5675c455a65b91e287b125a9e042ae39f (patch)
tree9d1255ea0a01396136ced032ba3f1fc5a46967cb /users/glittershark
parenta83abc902456cbdfcf31497c9c788fd9daf66109 (diff)
refactor: Move nixpkgs attribute to `third_party.nixpkgs` r/2470
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
Diffstat (limited to 'users/glittershark')
-rw-r--r--users/glittershark/achilles/default.nix4
-rw-r--r--users/glittershark/owothia/default.nix6
-rw-r--r--users/glittershark/pkgs/fprintd/default.nix6
-rw-r--r--users/glittershark/system/home/default.nix8
-rw-r--r--users/glittershark/system/home/modules/development.nix2
-rw-r--r--users/glittershark/system/system/default.nix14
-rw-r--r--users/glittershark/system/system/iso.nix10
-rw-r--r--users/glittershark/xanthous/default.nix4
-rw-r--r--users/glittershark/xanthous/pkg.nix10
9 files changed, 32 insertions, 32 deletions
diff --git a/users/glittershark/achilles/default.nix b/users/glittershark/achilles/default.nix
index 8ce6fda5c1..4ad71455d4 100644
--- a/users/glittershark/achilles/default.nix
+++ b/users/glittershark/achilles/default.nix
@@ -1,6 +1,6 @@
-{ pkgs, ... }:
+{ depot, pkgs, ... }:
 
-pkgs.naersk.buildPackage {
+depot.third_party.naersk.buildPackage {
   src = ./.;
 
   buildInputs = with pkgs; [
diff --git a/users/glittershark/owothia/default.nix b/users/glittershark/owothia/default.nix
index 171bb36689..e10098ed94 100644
--- a/users/glittershark/owothia/default.nix
+++ b/users/glittershark/owothia/default.nix
@@ -1,4 +1,6 @@
-{ pkgs ? (import ../../../. {}).third_party, ... }:
+{ depot ? (import ../../../. {})
+, pkgs ? depot.third_party.nixpkgs
+, ... }:
 
 pkgs.haskellPackages.callCabal2nix "owothia"
-  (pkgs.gitignoreSource ./.) { }
+  (depot.third_party.gitignoreSource ./.) { }
diff --git a/users/glittershark/pkgs/fprintd/default.nix b/users/glittershark/pkgs/fprintd/default.nix
index 0f9d414aeb..1a977e34d3 100644
--- a/users/glittershark/pkgs/fprintd/default.nix
+++ b/users/glittershark/pkgs/fprintd/default.nix
@@ -1,9 +1,11 @@
-args @ { pkgs, ... }:
+{ depot, pkgs, ... }:
 
 let
-  nixpkgs = import pkgs.nixpkgsSrc {
+  nixpkgs = import pkgs.path {
     config.allowUnfree = true;
     overlays = [(self: super: {
+      # TODO(grfn): Can we not override this here? It bootstraps
+      # rustc, builds firefox, and many other things.
       gcc = super.gcc9;
     })];
   };
diff --git a/users/glittershark/system/home/default.nix b/users/glittershark/system/home/default.nix
index 1d6d8795ab..1efba3f3c1 100644
--- a/users/glittershark/system/home/default.nix
+++ b/users/glittershark/system/home/default.nix
@@ -3,15 +3,13 @@
 with lib;
 
 rec {
-  nixpkgs = import pkgs.nixpkgsSrc {};
-
-  home = confPath: (import "${nixpkgs.home-manager.src}/modules" {
-    pkgs = nixpkgs;
+  home = confPath: (import "${pkgs.home-manager.src}/modules" {
+    inherit pkgs;
     configuration = { config, lib, ... }: {
       imports = [confPath];
 
       _module.args.pkgs = mkForce
-        (import pkgs.nixpkgsSrc (filterAttrs (n: v: v != null) config.nixpkgs));
+        (import pkgs.path (filterAttrs (n: v: v != null) config.nixpkgs));
 
       lib.depot = depot;
     };
diff --git a/users/glittershark/system/home/modules/development.nix b/users/glittershark/system/home/modules/development.nix
index 1152a3395a..04a501e74b 100644
--- a/users/glittershark/system/home/modules/development.nix
+++ b/users/glittershark/system/home/modules/development.nix
@@ -54,7 +54,7 @@ with lib;
     gdb
     lldb
     hyperfine
-    config.lib.depot.third_party.clang-tools
+    clang-tools
 
     clj2nix
     clojure
diff --git a/users/glittershark/system/system/default.nix b/users/glittershark/system/system/default.nix
index a640b3337c..78cab61a01 100644
--- a/users/glittershark/system/system/default.nix
+++ b/users/glittershark/system/system/default.nix
@@ -1,19 +1,15 @@
 args @ { depot, pkgs, ... }:
 
-let
-  nixpkgs = import pkgs.nixpkgsSrc {};
-in
-
 rec {
   chupacabra = import ./machines/chupacabra.nix;
 
-  chupacabraSystem = (pkgs.nixos {
+  chupacabraSystem = (depot.third_party.nixos {
     configuration = chupacabra;
   }).system;
 
   mugwump = import ./machines/mugwump.nix;
 
-  mugwumpSystem = (pkgs.nixos {
+  mugwumpSystem = (depot.third_party.nixos {
     configuration = mugwump;
   }).system;
 
@@ -22,14 +18,14 @@ rec {
   roswellSystem = (depot.ops.nixos.nixosFor ({ ... }: {
     imports = [
       ./machines/roswell.nix
-      "${nixpkgs.home-manager.src}/nixos"
+      "${pkgs.home-manager.src}/nixos"
     ];
 
     home-manager.users.grfn = { config, lib, ... }: {
       imports = [ ../home/machines/roswell.nix ];
       lib.depot = depot;
       _module.args.pkgs = lib.mkForce
-        (import pkgs.nixpkgsSrc
+        (import pkgs.path
           (lib.filterAttrs (n: v: v != null) config.nixpkgs));
     };
   })).system;
@@ -60,7 +56,7 @@ rec {
           system=$(nix-build -E '(import ${depotPath} {}).users.glittershark.system.system.${hostname}' --no-out-link)
           ;;
       '';
-    in depot.third_party.writeShellScriptBin "rebuilder" ''
+    in pkgs.writeShellScriptBin "rebuilder" ''
       set -ue
       if [[ $EUID -ne 0 ]]; then
         echo "Oh no! Only root is allowed to rebuild the system!" >&2
diff --git a/users/glittershark/system/system/iso.nix b/users/glittershark/system/system/iso.nix
index 056922ee1e..256aee6a5e 100644
--- a/users/glittershark/system/system/iso.nix
+++ b/users/glittershark/system/system/iso.nix
@@ -1,17 +1,17 @@
-{ pkgs, ... }:
+{ depot, lib, pkgs, ... }:
 
 let
   configuration = { ... }: {
     imports = [
-      "${pkgs.nixpkgsSrc}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
-      "${pkgs.nixpkgsSrc}/nixos/modules/installer/cd-dvd/channel.nix"
+      "${pkgs.path}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
+      "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix"
     ];
 
     networking.networkmanager.enable = true;
     networking.useDHCP = false;
     networking.firewall.enable = false;
-    networking.wireless.enable = pkgs.lib.mkForce false;
+    networking.wireless.enable = lib.mkForce false;
   };
-in (pkgs.nixos {
+in (depot.third_party.nixos {
   inherit configuration;
 }).config.system.build.isoImage
diff --git a/users/glittershark/xanthous/default.nix b/users/glittershark/xanthous/default.nix
index 0b89a50afb..c417c7af3e 100644
--- a/users/glittershark/xanthous/default.nix
+++ b/users/glittershark/xanthous/default.nix
@@ -4,4 +4,6 @@
 }:
 pkgs.haskell.lib.failOnAllWarnings (
   pkgs.haskellPackages.callPackage (import ./pkg.nix { inherit pkgs; }) {}
-)
+) // {
+  meta.ci = false;
+}
diff --git a/users/glittershark/xanthous/pkg.nix b/users/glittershark/xanthous/pkg.nix
index 98a9b9b6a6..16a6500866 100644
--- a/users/glittershark/xanthous/pkg.nix
+++ b/users/glittershark/xanthous/pkg.nix
@@ -1,10 +1,10 @@
-{ pkgs ? (import ../../../. {}).third_party }:
+{ depot ? (import ../../../. {})
+, pkgs ? depot.third_party.nixpkgs
+, ... }:
 
 let
-  ignore = pkgs.gitignoreSource.gitignoreFilter ./.;
-in
-
-import (pkgs.haskellPackages.haskellSrc2nix {
+  ignore = depot.third_party.gitignoreSource.gitignoreFilter ./.;
+in import (pkgs.haskellPackages.haskellSrc2nix {
   name = "xanthous";
   src = builtins.path {
     name = "xanthous-source";