fix hosts.rescue.img build

This commit is contained in:
2025-08-13 19:48:43 +00:00
parent 10e005d8c8
commit 3e35c4ae85
2 changed files with 14 additions and 8 deletions

View File

@@ -55,7 +55,17 @@
# this is actually a no-op, and the real action happens in assigning `nix.settings.nix-path`.
nix.nixPath = (lib.optionals (config.sane.maxBuildCost >= 2) [
"nixpkgs=${pkgs.path}"
]) ++ [
]) ++ (let
# XXX(2024-09-02): nix 2.24.4 errors when nixpkgs-overlays includes a symlink component:
# "error: path '/home/colin/dev' is a symlink"
# apparently nix has to explicitly handle symlinks in every place it might encounter them,
# so the fixes inside nix for this are manual and fragile. dereference it ourselves:
dev = if (config.sane.fs."/home/colin/dev" or {}) != {} then
config.sane.fs."/home/colin/dev".symlink.target
else
"/home/colin/dev"
;
in [
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
# "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
# as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git
@@ -65,12 +75,8 @@
# when it goes wrong. should i port my `nix-shell` scripts to something more tailored to my uses
# and then delete `nixpkgs-overlays`?
# "nixpkgs-overlays=/home/colin/dev/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
# XXX(2024-09-02): nix 2.24.4 errors when nixpkgs-overlays includes a symlink component:
# "error: path '/home/colin/dev' is a symlink"
# apparently nix has to explicitly handle symlinks in every place it might encounter them,
# so the fixes inside nix for this are manual and fragile. dereference it ourselves:
"nixpkgs-overlays=${config.sane.fs."/home/colin/dev".symlink.target}/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
];
"nixpkgs-overlays=${dev}/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
]);
# ensure new deployments have a source of this repo with which they can bootstrap.
# this however changes on every commit and can be slow to copy for e.g. `moby`.

View File

@@ -100,7 +100,7 @@ in
# ensure /var/log/journal symlink exists before starting:
serviceConfig.ExecStartPre = "-${lib.getExe' pkgs.systemd "systemd-tmpfiles"} --prefix=/var/log/journal --boot --create --graceful";
unitConfig.DefaultDependencies = false;
unitConfig.RequiresMountsFor = [
unitConfig.RequiresMountsFor = lib.optionals config.sane.persist.enable [
config.sane.persist.sys.byPath."/var/log/journal".store.origin
];
};