about summary refs log tree commit diff
path: root/users/glittershark/system
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2021-04-02T12·15+0000
committerlukegb <lukegb@tvl.fyi>2021-04-02T18·00+0000
commitb71362f198531474bc011bed596cdfe30d9ae5e9 (patch)
treeab200a62d347caa81b394e0b0895552be69fc735 /users/glittershark/system
parent4bfcd09682e5f23e6a3bd0d601afd77e02d4933d (diff)
refactor(users/glittershark/system): switch to ops.nixos.nixosFor r/2405
ops.nixos.nixosFor is intended to provide the "basic" readTree-like
system arguments to NixOS systems; in particular, it provides "depot" as
a module argument, as well as, for the moment, config.depot.

Change-Id: I442c7d79ac0eb2ff8e1bf606f4e083e15eb0a8f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2761
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/glittershark/system')
-rw-r--r--users/glittershark/system/system/default.nix40
1 files changed, 14 insertions, 26 deletions
diff --git a/users/glittershark/system/system/default.nix b/users/glittershark/system/system/default.nix
index aa0afb4c59..a640b3337c 100644
--- a/users/glittershark/system/system/default.nix
+++ b/users/glittershark/system/system/default.nix
@@ -19,36 +19,24 @@ rec {
 
   roswell = import ./machines/roswell.nix;
 
-  roswellSystem = (pkgs.nixos {
-    configuration = { ... }: {
-      imports = [
-        ./machines/roswell.nix
-        "${nixpkgs.home-manager.src}/nixos"
-        "${depot.depotPath}/ops/nixos/depot.nix"
-      ];
-      inherit depot;
-
-      home-manager.users.grfn = { config, lib, ... }: {
-        imports = [ ../home/machines/roswell.nix ];
-        lib.depot = depot;
-        _module.args.pkgs = lib.mkForce
-          (import pkgs.nixpkgsSrc
-            (lib.filterAttrs (n: v: v != null) config.nixpkgs));
-      };
+  roswellSystem = (depot.ops.nixos.nixosFor ({ ... }: {
+    imports = [
+      ./machines/roswell.nix
+      "${nixpkgs.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
+          (lib.filterAttrs (n: v: v != null) config.nixpkgs));
     };
-  }).system;
+  })).system;
 
   yeren = import ./machines/yeren.nix;
 
-  yerenSystem = (pkgs.nixos {
-    configuration = { ... }: {
-      imports = [
-        ./machines/yeren.nix
-        "${depot.depotPath}/ops/nixos/depot.nix"
-      ];
-      inherit depot;
-    };
-  }).system;
+  yerenSystem = depot.ops.nixos.nixosFor yeren;
 
   iso = import ./iso.nix args;