From 5d9d03057c51ae4364a3f776d92e4b4206fbc7c7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 26 May 2022 14:44:11 +0200 Subject: refactor(grfn): Prepare for restricted-eval Change-Id: I672ad0898b2ef6a11f8bc9233da0ded4a296fe0e Reviewed-on: https://cl.tvl.fyi/c/depot/+/5686 Autosubmit: tazjin Tested-by: BuildkiteCI Reviewed-by: grfn --- users/grfn/system/home/default.nix | 2 +- users/grfn/system/home/modules/common.nix | 1 + users/grfn/system/system/iso.nix | 4 ++-- users/grfn/system/system/machines/mugwump.nix | 8 ++++---- users/grfn/terraform/nixosMachine.nix | 2 +- users/grfn/xanthous/server/default.nix | 8 ++++++++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/users/grfn/system/home/default.nix b/users/grfn/system/home/default.nix index 37d53fec1a..874d7b2cb2 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 32df92893a..a24c5961de 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 92a13f6552..9fa8e7ec7e 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 05b78ce517..0774e06119 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 dfecbff60a..23cd838804 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 95c2b15ec9..fbb5ccd269 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; }; -- cgit 1.4.1