allow for legacy boot
This commit is contained in:
parent
7f09dc7f9a
commit
008e6e98b7
19
README.md
19
README.md
@ -3,8 +3,17 @@
|
|||||||
## Start a NixOS setup with Impermanence
|
## Start a NixOS setup with Impermanence
|
||||||
|
|
||||||
1. Create the configuration with the template
|
1. Create the configuration with the template
|
||||||
`nix flake init --template https://github.com/Krezzlu/impermanence-talk#default --extra-experimental-features "nix-command flakes"`
|
`nix-shell -p git`
|
||||||
2. Change the template to your liking.
|
`nix flake new nixos --template git+https://git.krsnik.at/Kristian/impermanence-talk#default --extra-experimental-features "nix-command flakes"`
|
||||||
Specifically the `disko.nix` file.
|
`cd nixos`
|
||||||
3. `nix develop --extra-experimental-features "nix-command flakes"`
|
`nix develop --extra-experimental-features "nix-command flakes"`
|
||||||
4. `sudo disko --mode disko ./systems/desktop/<system>/disko.nix`
|
`[CHANGE SETTINGS]`
|
||||||
|
`sudo disko --mode disko ./systems/disko.nix`
|
||||||
|
`[ENTER PASSWORD FOR ENCRYPTION]`
|
||||||
|
`cd ..`
|
||||||
|
`sudo mv nixos /mnt/persist`
|
||||||
|
`cd nixos /mnt/persist/nixos`
|
||||||
|
|
||||||
|
`sudo nixos-generate-config --no-filesystems --force --root /mnt --dir ./system`
|
||||||
|
`sudo nixos-install --no-root-password --root /mnt --flake .#default`
|
||||||
|
|
||||||
|
@ -26,18 +26,15 @@
|
|||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
{
|
# {
|
||||||
imports = [
|
# imports = [
|
||||||
(import ./system/disko.nix {})
|
# (import ./system/disko.nix {})
|
||||||
];
|
# ];
|
||||||
}
|
# }
|
||||||
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
|
||||||
./system
|
./system
|
||||||
{
|
|
||||||
system.stateVersion = "23.11";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
device ? throw "Missing required argument device. (e.g. /dev/sda)",
|
device ? throw "Missing required argument device. (e.g. /dev/sda)",
|
||||||
swapCapacity ? throw "Missing required argument swapCapacity. (e.g. 16G)",
|
swapCapacity ? throw "Missing required argument swapCapacity. (e.g. 16G)",
|
||||||
ssd ? false,
|
ssd ? false,
|
||||||
|
efi ? true,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
@ -14,8 +15,14 @@
|
|||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
"esp" = {
|
"esp" = {
|
||||||
size = "512M";
|
size =
|
||||||
type = "EF00";
|
if efi
|
||||||
|
then "512M"
|
||||||
|
else "1M";
|
||||||
|
type =
|
||||||
|
if efi
|
||||||
|
then "EF00"
|
||||||
|
else "EF02";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
mutableUsers = false; # Disallow creation of new users and groups
|
mutableUsers = false; # Disallow creation of new users and groups
|
||||||
|
|
||||||
users."admin" = {
|
users."admin" = {
|
||||||
|
password = "changeme"; # TODO: Maybe put a throw here.
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user