Compare commits
4 Commits
62eeee5670
...
a0e2a0d0cd
Author | SHA1 | Date | |
---|---|---|---|
a0e2a0d0cd
|
|||
f3a1ada46e
|
|||
253f148d93
|
|||
a3a89b08c0
|
@ -322,3 +322,16 @@ $ drive: eza -1 /dev | rg --trim -e "^nvme\dn\dp\d" | sd "n\dp\d" "" | sort -u
|
|||||||
# Query NVME SSD used percentage
|
# Query NVME SSD used percentage
|
||||||
sudo nvme smart-log /dev/<drive> | rg --trim "percentage_used"
|
sudo nvme smart-log /dev/<drive> | rg --trim "percentage_used"
|
||||||
$ drive: eza -1 /dev | rg --trim -e "^nvme\dn\dp\d" | sd "n\dp\d" "" | sort -u
|
$ drive: eza -1 /dev | rg --trim -e "^nvme\dn\dp\d" | sd "n\dp\d" "" | sort -u
|
||||||
|
|
||||||
|
% cryptsetup
|
||||||
|
# Open LUKS device
|
||||||
|
sudo cryptsetup luksOpen /dev/<drive> <label>
|
||||||
|
$ drive: eza -1 /dev | rg --trim -e "^nvme\dn\dp\d" | sd "n\dp\d" "" | sort -u
|
||||||
|
|
||||||
|
% cryptsetup
|
||||||
|
# Close LUKS device
|
||||||
|
sudo cryptsetup luksClose <label>
|
||||||
|
|
||||||
|
% disko
|
||||||
|
# Partition and format disks
|
||||||
|
sudo disko --mode disko --flake .#<target>
|
||||||
|
@ -137,7 +137,8 @@ in {
|
|||||||
cdd = "zi";
|
cdd = "zi";
|
||||||
b = "z -"; # jump to previous dir
|
b = "z -"; # jump to previous dir
|
||||||
mkdir = "mkdir -p"; # also create parents (-p)
|
mkdir = "mkdir -p"; # also create parents (-p)
|
||||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MODEL,ID,UUID,MOUNTPOINT";
|
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||||
|
blkid = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||||
watch = "watch -d -c -n 0.5";
|
watch = "watch -d -c -n 0.5";
|
||||||
nd = "nix develop";
|
nd = "nix develop";
|
||||||
nb = "nix build -L";
|
nb = "nix build -L";
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
ESP = {
|
||||||
|
# NOTE: The disk identification uses /dev/disk/by-partlabel,
|
||||||
|
# so make sure this matches the actual partlabel!!!
|
||||||
label = "EFI";
|
label = "EFI";
|
||||||
size = "512M";
|
size = "512M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
@ -15,7 +17,7 @@
|
|||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
mountOptions = ["defaults"];
|
mountOptions = ["umask=077"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
luks = {
|
luks = {
|
||||||
|
@ -41,14 +41,14 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: Some filesystems are managed by disko (see ./disks.nix)
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
# TODO: Reformat
|
# NOTE: Some filesystems are managed by disko (see ./disks.nix)
|
||||||
# "/home/christoph/Games" = {
|
|
||||||
# device = "/dev/disk/by-uuid/e57c1831-09d7-4046-9c62-086d3596f825";
|
"/home/christoph/Games" = {
|
||||||
# fsType = "ext4";
|
device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_2000GB_231623802252-part1";
|
||||||
# options = ["defaults" "rw" "relatime"];
|
fsType = "ext4";
|
||||||
# };
|
options = ["defaults" "rw" "noatime"];
|
||||||
|
};
|
||||||
|
|
||||||
# If the bg option is specified, a timeout or failure causes the mount(8) command
|
# If the bg option is specified, a timeout or failure causes the mount(8) command
|
||||||
# to fork a child which continues to attempt to mount the export.
|
# to fork a child which continues to attempt to mount the export.
|
||||||
@ -66,19 +66,19 @@
|
|||||||
"/home/christoph/Movies" = {
|
"/home/christoph/Movies" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Movie";
|
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Movie";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/home/christoph/Shows" = {
|
"/home/christoph/Shows" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Show";
|
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Show";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/home/christoph/Music" = {
|
"/home/christoph/Music" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Music";
|
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Music";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user