2023-07-11 09:12:50 -06:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2022-08-25 12:21:35 -06:00
|
|
|
with lib; {
|
|
|
|
options = {
|
|
|
|
nixLockdown = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Lockdown Nix";
|
|
|
|
default = true;
|
|
|
|
example = true;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf config.nixLockdown.enable {
|
2022-11-22 21:30:31 -07:00
|
|
|
nix = {
|
2022-08-25 12:21:35 -06:00
|
|
|
settings.sandbox = true;
|
2023-07-11 09:12:50 -06:00
|
|
|
settings.trusted-users = ["@wheel"];
|
|
|
|
settings.allowed-users = ["root" "qbit"];
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|