Test disk layout

This commit is contained in:
iFargle 2023-09-22 10:45:07 +09:00
parent 2c57539f9f
commit fd59a1df25
4 changed files with 46 additions and 48 deletions

View file

@ -4,6 +4,8 @@
* Installing a system from the ISO: * Installing a system from the ISO:
``` ```
nixos-install <Hostname> [<Username>]
HOSTNAME='YourHostnameHere' HOSTNAME='YourHostnameHere'
curl https://git.sysctl.io/albert/nix/raw/branch/main/nixos/hosts/${HOSTNAME}/disks.nix >> /tmp/disks.nix curl https://git.sysctl.io/albert/nix/raw/branch/main/nixos/hosts/${HOSTNAME}/disks.nix >> /tmp/disks.nix
echo 'LUKSEncryptionKeyHere' >> /tmp/secret.key echo 'LUKSEncryptionKeyHere' >> /tmp/secret.key
@ -32,7 +34,7 @@ nixos-install --flake /etc/nixos/git#${HOSTNAME} -v --show-trace --no-root-passw
* [ ] Add bracket auto-completion * [ ] Add bracket auto-completion
* [ ] Find a way to have magit save login credentials * [ ] Find a way to have magit save login credentials
* [x] Try disko - [Link](https://github.com/nix-community/disko) * [x] Try disko - [Link](https://github.com/nix-community/disko)
* [ ] btrfs snapshots * [ ] btrfs snapshotsd
* [ ] vscodium and user-config.js file? * [ ] vscodium and user-config.js file?
* [ ] rofi - bitwarden-cli / bitwarden-menu ([Link](https://search.nixos.org/packages?channel=23.05&show=bitwarden-menu&from=0&size=50&sort=relevance&type=packages&query=bitwarden)) * [ ] rofi - bitwarden-cli / bitwarden-menu ([Link](https://search.nixos.org/packages?channel=23.05&show=bitwarden-menu&from=0&size=50&sort=relevance&type=packages&query=bitwarden))

View file

@ -59,7 +59,7 @@
]; ];
}; };
# Combines mkHost and mkHome for image building # Combines mkHost and mkHome for image building - Uses minimal to make a smaller image
mkMinImage = { mkMinImage = {
hostname , hostname ,
username ? "albert", username ? "albert",

View file

@ -2,37 +2,34 @@
disko.devices = { disko.devices = {
disk = { disk = {
sda = { sda = {
type = "disk";
device = "/dev/sda"; device = "/dev/sda";
content = { content = {
type = "gpt"; type = "table";
partitions = { format = "gpt";
ESP = { partitions = [
label = "EFI"; {
name = "ESP"; name = "BOOT";
size = "512M"; label = "BOOT";
type = "EF00"; start = "0%";
end = "550MiB";
bootable = true; bootable = true;
flags = [ "esp" ];
fs-type = "fat32";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [
"defaults"
];
}; };
}; }
luks = { {
name = "ROOT";
label = "ROOT";
size = "100%"; size = "100%";
content = { content = {
type = "luks"; type = "luks";
name = "crypted"; name = "LUKS-ROOT";
extraOpenArgs = [ "--allow-discards" ]; extraOpenArgs = [ "--allow-discards" ];
# if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
#passwordFile = "/tmp/secret.key"; # Interactive
settings.keyFile = "/tmp/secret.key"; settings.keyFile = "/tmp/secret.key";
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = [ "-f" ];
@ -51,9 +48,8 @@
}; };
}; };
}; };
}; }
}; ];
};
}; };
}; };
}; };