-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1730380
commit ef2c4ff
Showing
9 changed files
with
84 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This dummy configuration contains: | ||
# 1. Options that probably anyone will copying from other files in | ||
# `/configs/**/*.nix` will have defined anyways. | ||
# The reason here is just to get rid of warnings and remove noise | ||
# from the other configs | ||
# 2. Use the unbootable module so that we can evaluate the toplevel | ||
# without caring about boot. This will usually be overriden with | ||
# `pkgs.lib.mkForce` whenver we want to boot the system. | ||
# The fact that we use this module is also hidden here, not to | ||
# confuse anyone just wanting to copy paste from other files in | ||
# `/configs/**/*.nix`. | ||
{...}: { | ||
nixpkgs.hostPlatform = "x86_64-linux"; | ||
system.stateVersion = "23.05"; | ||
|
||
# See the module in `/modules/unbootable.nix`. | ||
unbootable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This module is used with configuraion examples, to obtain | ||
# | ||
# config.system.build.toplevel | ||
# | ||
# without configuring any specific boot, i.e. no contaner (`boot.isContainer`) | ||
# or virtualisation ("${modulesPath}/virtualisation/qemu-vm.nix"). | ||
# Of course, the resulting system is (by default) unbootable, | ||
# which might appear useless. | ||
# However, evaluation of the toplevel is slightly faster, and boot can | ||
# be restored by | ||
# | ||
# unbootable = pkgs.lib.mkForce false; | ||
# | ||
# or simply setting | ||
# | ||
# boot.initrd.enable | ||
# boot.kernel.enable | ||
# boot.loader.grub.enable | ||
# | ||
# accordingly. | ||
{ | ||
lib, | ||
config, | ||
... | ||
}: | ||
with lib; { | ||
options = { | ||
unbootable = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = "Prevent the system from booting."; | ||
}; | ||
}; | ||
config = mkIf config.unbootable { | ||
boot = { | ||
initrd.enable = mkDefault false; | ||
kernel.enable = mkDefault false; | ||
loader.grub.enable = mkDefault false; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters