Docs and framework disk configs
This commit is contained in:
parent
6bdd97058d
commit
9f97706ba2
2 changed files with 49 additions and 0 deletions
11
README.md
11
README.md
|
@ -2,6 +2,17 @@
|
|||
## NOTE: These configs expect this repo to be cloned to /etc/nixos/git/
|
||||
### For first-run, see [setup.sh](docs/setup.sh)
|
||||
|
||||
* Installing a system from the ISO:
|
||||
```
|
||||
HOSTNAME='YourHostnameHere'
|
||||
curl https://git.sysctl.io/albert/nix/raw/branch/main/nixos/hosts/${HOSTNAME}/disks.nix >> /tmp/disks.nix
|
||||
echo 'LUKSEncryptionKeyHere' >> /tmp/secret.key
|
||||
nix run github:nix-community/disko -- --mode disko /tmp/disks.nix
|
||||
mkdir -p /mnt/etc/nixos/
|
||||
git clone https://git.sysctl.io/albert/nix /etc/nixos/git
|
||||
nixos-install --flake /etc/nixos/git#${HOSTNAME} -v --show-trace
|
||||
```
|
||||
|
||||

|
||||
---
|
||||
# To Do List
|
||||
|
|
38
nixos/hosts/nixos-framework/disks.nix
Normal file
38
nixos/hosts/nixos-framework/disks.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ disks ? }: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vda = {
|
||||
type = "disk";
|
||||
device = "/dev/vda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "100M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue