summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorsbh69840 <sbh69840@gmail.com>2023-05-10 20:03:21 +0530
committersbh69840 <sbh69840@gmail.com>2023-05-10 20:03:21 +0530
commitccaa942888f53404b56d979cb3a0a5c9f18a1faa (patch)
tree90bd58817f53fcc47e3d0432a1e71b52aa59fadc /modules
parentecb5840f6bc2cdb453bbc0dbbd8f63ec441808d6 (diff)
don't check knownSha256 for authorized_keys files
Diffstat (limited to 'modules')
-rw-r--r--modules/system/etc.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/system/etc.nix b/modules/system/etc.nix
index a27e49e..4b45e3a 100644
--- a/modules/system/etc.nix
+++ b/modules/system/etc.nix
@@ -57,6 +57,10 @@ in
if [ ! -e "$d" ]; then
mkdir -p "$d"
fi
+ if [ -e "$f".copy ]; then
+ cp "$f" "$l"
+ continue
+ fi
if [ -e "$l" ]; then
if [ "$(readlink "$l")" != "$f" ]; then
if ! grep -q /etc/static "$l"; then
@@ -65,11 +69,7 @@ in
for h in ''${etcSha256Hashes["$l"]}; do
if [ "$o" = "$h" ]; then
mv "$l" "$l.orig"
- if [ -e "$f".copy ]; then
- cp "$f" "$l"
- else
- ln -s "$f" "$l"
- fi
+ ln -s "$f" "$l"
break
else
h=
@@ -83,11 +83,7 @@ in
fi
fi
else
- if [ -e "$f".copy ]; then
- cp "$f" "$l"
- else
- ln -s "$f" "$l"
- fi
+ ln -s "$f" "$l"
fi
done