From 755fc00a004ee890582dbb8f35b3b43e09f6202f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Jun 2021 21:55:35 +0200 Subject: link flake into /etc/nixos --- system-profiles/core.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system-profiles/core.nix b/system-profiles/core.nix index c31ba0c4..588f4632 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix @@ -75,5 +75,13 @@ in { }; environment.systemPackages = [ pkgs.git ] ++ lib.optional hasSops pkgs.gnupg; + + system.activationScripts.symlink-flake = '' + if test -L /etc/nixos; then + ln -nsf ${flake} /etc/nixos + elif rmdir --ignore-fail-on-non-empty /etc/nixos; then + ln -s ${flake} /etc/nixos + fi + ''; }; } -- cgit v1.2.3