-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support
disko
for recovery disk
- Loading branch information
1 parent
678a712
commit 883363d
Showing
8 changed files
with
148 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ lib, wm, ... }: { | ||
imports = | ||
[ | ||
./filesystem.nix | ||
./gpu.nix | ||
./hardware-configuration.nix | ||
./network.nix | ||
|
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,104 @@ | ||
{ lib, ... }: | ||
let | ||
device = "/dev/disk/by-id/usb-SAMSUNG_MZALQ128HBHQ_DD56419883ED9-0:0"; | ||
in | ||
{ | ||
disko.devices = { | ||
disk = { | ||
root = { | ||
inherit device; | ||
type = "disk"; | ||
content = { | ||
type = "gpt"; | ||
partitions = { | ||
ESP = { | ||
size = "512M"; | ||
type = "EF00"; | ||
content = { | ||
type = "filesystem"; | ||
format = "vfat"; | ||
mountpoint = "/boot"; | ||
mountOptions = [ | ||
"defaults" | ||
]; | ||
}; | ||
}; | ||
lvm-recovery = { | ||
size = "100%"; | ||
type = "8E00"; | ||
content = { | ||
type = "lvm_pv"; | ||
vg = "lvm-recovery"; | ||
}; | ||
}; | ||
luks-recovery = { | ||
size = "32G"; | ||
content = { | ||
type = "luks"; | ||
name = "crypted-recovery"; | ||
extraOpenArgs = [ ]; | ||
settings = { | ||
# 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` | ||
keyFile = "/tmp/secrets/luks.key"; | ||
allowDiscards = true; | ||
}; | ||
# additionalKeyFiles = [ "/tmp/secrets/additionalSecret.key" ]; | ||
content = { | ||
type = "lvm_pv"; | ||
vg = "secrets-recovery"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
lvm_vg = { | ||
lvm-recovery = { | ||
type = "lvm_vg"; | ||
lvs = { | ||
root = { | ||
size = "4G"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/"; | ||
mountOptions = [ | ||
"defaults" | ||
]; | ||
}; | ||
}; | ||
nix = { | ||
size = "100%FREE"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/nix"; | ||
}; | ||
}; | ||
home = { | ||
size = "16G"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/home"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
secrets-recovery = { | ||
type = "lvm_vg"; | ||
lvs = { | ||
secrets = { | ||
size = "100%FREE"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
, ... | ||
}: { | ||
networking = { | ||
wireless.enable = false; | ||
hostName = "${hostname}"; | ||
|
||
networkmanager = { | ||
|
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