Test disk layout
This commit is contained in:
parent
2c57539f9f
commit
fd59a1df25
4 changed files with 46 additions and 48 deletions
|
@ -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))
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -2,58 +2,54 @@
|
||||||
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%";
|
||||||
bootable = true;
|
end = "550MiB";
|
||||||
content = {
|
bootable = true;
|
||||||
type = "filesystem";
|
flags = [ "esp" ];
|
||||||
format = "vfat";
|
fs-type = "fat32";
|
||||||
mountpoint = "/boot";
|
content = {
|
||||||
mountOptions = [
|
type = "filesystem";
|
||||||
"defaults"
|
format = "vfat";
|
||||||
];
|
mountpoint = "/boot";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
luks = {
|
}
|
||||||
size = "100%";
|
{
|
||||||
|
name = "ROOT";
|
||||||
|
label = "ROOT";
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "LUKS-ROOT";
|
||||||
|
extraOpenArgs = [ "--allow-discards" ];
|
||||||
|
settings.keyFile = "/tmp/secret.key";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "btrfs";
|
||||||
name = "crypted";
|
extraArgs = [ "-f" ];
|
||||||
extraOpenArgs = [ "--allow-discards" ];
|
subvolumes = {
|
||||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
"/root" = {
|
||||||
# for example use `echo -n "password" > /tmp/secret.key`
|
mountpoint = "/";
|
||||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
settings.keyFile = "/tmp/secret.key";
|
};
|
||||||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
"/home" = {
|
||||||
content = {
|
mountpoint = "/home";
|
||||||
type = "btrfs";
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
extraArgs = [ "-f" ];
|
};
|
||||||
subvolumes = {
|
"/nix" = {
|
||||||
"/root" = {
|
mountpoint = "/nix";
|
||||||
mountpoint = "/";
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
mountpoint = "/home";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
};
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue