Files
nixos/system-master/home/first.nix
T
2026-02-22 19:25:39 +01:00

19 lines
499 B
Nix

{ pkgs, user, flakeRoot, lib, ... }:
let
repoConfDir = flakeRoot + "/assets/conf";
in
{
home.activation.copyWritableConf =
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
set -eu
target="$HOME/conf"
# Start fresh to avoid mixed old/new files
rm -rf "$target"
mkdir -p "$target"
# Copy repo content into a normal writable directory
cp -a "${repoConfDir}/." "$target/"
# Ensure the user can edit everything
chmod -R u+rwX "$target"
'';
}