mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-23 00:28:28 +03:00
Add extra debugging features:
- 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 <enki@fsck.pl>
This commit is contained in:
parent
5ef3f953d3
commit
0ad8d2bf54
1 changed files with 11 additions and 1 deletions
10
nixos-infect
10
nixos-infect
|
@ -41,6 +41,14 @@ makeConf() {
|
||||||
$NIXOS_IMPORT
|
$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;
|
boot.tmp.cleanOnBoot = true;
|
||||||
zramSwap.enable = ${zramswap};
|
zramSwap.enable = ${zramswap};
|
||||||
networking.hostName = "$(hostname -s)";
|
networking.hostName = "$(hostname -s)";
|
||||||
|
@ -399,7 +407,9 @@ if [[ -z "$NO_SWAP" ]]; then
|
||||||
makeSwap # smallest (512MB) droplet needs extra memory!
|
makeSwap # smallest (512MB) droplet needs extra memory!
|
||||||
fi
|
fi
|
||||||
makeConf
|
makeConf
|
||||||
|
if [[ -z "$NO_INFECT" ]]; then
|
||||||
infect
|
infect
|
||||||
|
fi
|
||||||
if [[ -z "$NO_SWAP" ]]; then
|
if [[ -z "$NO_SWAP" ]]; then
|
||||||
removeSwap
|
removeSwap
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue