about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-05-26T12·44+0200
committertazjin <tazjin@tvl.su>2022-05-26T16·37+0000
commit5d9d03057c51ae4364a3f776d92e4b4206fbc7c7 (patch)
tree1061ba633bf5fa5ab2144b08f12e9408c396a024
parent7a0a4224a5ea356373e427c92ba4f4d38c6a468c (diff)
refactor(grfn): Prepare for restricted-eval r/4140
Change-Id: I672ad0898b2ef6a11f8bc9233da0ded4a296fe0e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5686
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
-rw-r--r--users/grfn/system/home/default.nix2
-rw-r--r--users/grfn/system/home/modules/common.nix1
-rw-r--r--users/grfn/system/system/iso.nix4
-rw-r--r--users/grfn/system/system/machines/mugwump.nix8
-rw-r--r--users/grfn/terraform/nixosMachine.nix2
-rw-r--r--users/grfn/xanthous/server/default.nix8
6 files changed, 17 insertions, 8 deletions
diff --git a/users/grfn/system/home/default.nix b/users/grfn/system/home/default.nix
index 37d53fec1ad2..874d7b2cb281 100644
--- a/users/grfn/system/home/default.nix
+++ b/users/grfn/system/home/default.nix
@@ -3,7 +3,7 @@
 with lib;
 
 rec {
-  home = confPath: (import "${pkgs.home-manager.src}/modules" {
+  home = confPath: (import (pkgs.home-manager.src + "/modules") {
     inherit pkgs;
 
     configuration = { config, lib, ... }: {
diff --git a/users/grfn/system/home/modules/common.nix b/users/grfn/system/home/modules/common.nix
index 32df92893a49..a24c5961de8a 100644
--- a/users/grfn/system/home/modules/common.nix
+++ b/users/grfn/system/home/modules/common.nix
@@ -13,6 +13,7 @@
     ../modules/lib/cloneRepo.nix
   ];
 
+  home.username = "grfn";
   home.homeDirectory = "/home/grfn";
 
   programs.password-store.enable = true;
diff --git a/users/grfn/system/system/iso.nix b/users/grfn/system/system/iso.nix
index 92a13f655214..9fa8e7ec7e3b 100644
--- a/users/grfn/system/system/iso.nix
+++ b/users/grfn/system/system/iso.nix
@@ -3,8 +3,8 @@
 let
   configuration = { ... }: {
     imports = [
-      "${pkgs.path}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
-      "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix"
+      (pkgs.path + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
+      (pkgs.path + "/nixos/modules/installer/cd-dvd/channel.nix")
     ];
 
     networking.networkmanager.enable = true;
diff --git a/users/grfn/system/system/machines/mugwump.nix b/users/grfn/system/system/machines/mugwump.nix
index 05b78ce51703..0774e0611957 100644
--- a/users/grfn/system/system/machines/mugwump.nix
+++ b/users/grfn/system/system/machines/mugwump.nix
@@ -6,10 +6,10 @@ with lib;
   imports = [
     ../modules/common.nix
     (modulesPath + "/installer/scan/not-detected.nix")
-    "${depot.path}/ops/modules/prometheus-fail2ban-exporter.nix"
-    "${depot.path}/users/grfn/xanthous/server/module.nix"
-    "${depot.third_party.agenix.src}/modules/age.nix"
-    "${depot.path}/users/grfn/bbbg/module.nix"
+    (depot.path.origSrc + "/ops/modules/prometheus-fail2ban-exporter.nix")
+    (depot.path.origSrc + "/users/grfn/xanthous/server/module.nix")
+    (depot.third_party.agenix.src + "/modules/age.nix")
+    (depot.path.origSrc + "/users/grfn/bbbg/module.nix")
   ];
 
   networking.hostName = "mugwump";
diff --git a/users/grfn/terraform/nixosMachine.nix b/users/grfn/terraform/nixosMachine.nix
index dfecbff60a3e..23cd83880420 100644
--- a/users/grfn/terraform/nixosMachine.nix
+++ b/users/grfn/terraform/nixosMachine.nix
@@ -15,7 +15,7 @@
 let
   os = depot.ops.nixos.nixosFor ({ modulesPath, ... }: {
     imports = [
-      "${pkgs.path}/nixos/modules/virtualisation/amazon-image.nix"
+      (pkgs.path + "/nixos/modules/virtualisation/amazon-image.nix")
       configuration
     ];
 
diff --git a/users/grfn/xanthous/server/default.nix b/users/grfn/xanthous/server/default.nix
index 95c2b15ec95f..fbb5ccd26920 100644
--- a/users/grfn/xanthous/server/default.nix
+++ b/users/grfn/xanthous/server/default.nix
@@ -7,6 +7,14 @@ depot.third_party.naersk.buildPackage {
   name = "xanthous-server";
   version = "0.0.1";
   src = depot.third_party.gitignoreSource ./.;
+
+  # Workaround for a potential Nix bug related to restricted eval.
+  # See https://github.com/nix-community/naersk/issues/169
+  root = depot.nix.sparseTree ./. [
+    ./Cargo.toml
+    ./Cargo.lock
+  ];
+
   passthru = {
     docker = import ./docker.nix args;
   };