Skip to content

Commit

Permalink
Add extra debugging features:
Browse files Browse the repository at this point in the history
- ability to set a root password by specifying the 'root_password_hash' environment variable
- ability to skip actual injection step by specifying the 'NO_INJECT' environment variable

Signed-off-by: Maciej Grela <[email protected]>
  • Loading branch information
enkiusz committed Oct 26, 2024
1 parent 5ef3f95 commit 0ad8d2b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nixos-infect
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ makeConf() {
$NIXOS_IMPORT
];
<<<<<<< Updated upstream
=======
# Workaround for https://github.com/NixOS/nix/issues/8502
services.logrotate.checkConfig = false;
${root_password_hash:+users.users.root.initialHashedPassword = ''$root_password_hash'';}
>>>>>>> Stashed changes
boot.tmp.cleanOnBoot = true;
zramSwap.enable = ${zramswap};
networking.hostName = "$(hostname -s)";
Expand Down Expand Up @@ -399,7 +407,9 @@ if [[ -z "$NO_SWAP" ]]; then
makeSwap # smallest (512MB) droplet needs extra memory!
fi
makeConf
infect
if [[ -z "$NO_INFECT" ]]; then
infect
fi
if [[ -z "$NO_SWAP" ]]; then
removeSwap
fi
Expand Down

0 comments on commit 0ad8d2b

Please sign in to comment.