forked from aylac.top/nixcfg
this repo has no description

im gonna reinstall it

Changed files
+124 -26
hosts
+1 -26
hosts/morgana/default.nix
···
imports = [
./home.nix
./secrets.nix
+
./disko.nix
self.nixosModules.locale-en-gb
];
···
];
luks.devices."luks-cc030211-13e5-4411-a906-94c6ef45a0c6".device = "/dev/disk/by-uuid/cc030211-13e5-4411-a906-94c6ef45a0c6";
-
};
-
-
fileSystems = {
-
"/" = {
-
device = "/dev/disk/by-uuid/8ed468ba-610b-49c8-8b93-5a20d4bf14da";
-
fsType = "btrfs";
-
options = [
-
"subvol=@"
-
"compress=zstd"
-
"noatime"
-
];
-
};
-
-
"/boot" = {
-
device = "/dev/disk/by-uuid/4831-1B0D";
-
fsType = "vfat";
-
options = [
-
"fmask=0077"
-
"dmask=0077"
-
];
-
};
-
-
"/home/Data" = {
-
device = "/dev/disk/by-uuid/6cfb1f47-51d6-4ece-ab1c-6ad3c2d41542";
-
fsType = "ext4";
-
};
};
}
+123
hosts/morgana/disko.nix
···
+
{
+
config,
+
lib,
+
...
+
}: {
+
options.myDisko = {
+
installDrive = lib.mkOption {
+
description = "Disk to install NixOS to.";
+
default = "/dev/disk/by-id/ata-ADATA_IM2S3338-128GD2_5J3020000635";
+
type = lib.types.str;
+
};
+
dataDrive = lib.mkOption {
+
description = "Data disk.";
+
default = "/dev/disk/by-id/ata-WDC_WD10SPZX-24Z10_WD-WXJ1A891NRKE";
+
type = lib.types.str;
+
};
+
};
+
+
config = {
+
assertions = [
+
{
+
assertion = config.myDisko.installDrive != "";
+
message = "config.myDisko.installDrive cannot be empty.";
+
}
+
];
+
+
disko.devices = {
+
disk = {
+
ssd = {
+
type = "disk";
+
device = config.myDisko.installDrive;
+
+
content = {
+
type = "gpt";
+
+
partitions = {
+
ESP = {
+
content = {
+
format = "vfat";
+
+
mountOptions = [
+
"defaults"
+
"umask=0077"
+
];
+
+
mountpoint = "/boot";
+
type = "filesystem";
+
};
+
+
size = "1024M";
+
type = "EF00";
+
};
+
+
luks = {
+
size = "100%";
+
content = {
+
type = "luks";
+
name = "crypted";
+
+
content = {
+
type = "btrfs";
+
extraArgs = ["-f"];
+
+
subvolumes = {
+
"/home" = {
+
mountpoint = "/home";
+
mountOptions = ["compress=zstd" "noatime"];
+
};
+
+
"/home/.snapshots" = {
+
mountOptions = ["compress=zstd" "noatime"];
+
mountpoint = "/home/.snapshots";
+
};
+
+
"/nix" = {
+
mountpoint = "/nix";
+
mountOptions = ["compress=zstd" "noatime"];
+
};
+
+
"/root" = {
+
mountpoint = "/";
+
mountOptions = ["compress=zstd" "noatime"];
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
harddrive = {
+
type = "disk";
+
device = config.myDisko.dataDrive;
+
+
content = {
+
type = "gpt";
+
partitions = {
+
luks = {
+
size = "100%";
+
content = {
+
type = "luks";
+
name = "crypted_harddrive";
+
+
content = {
+
type = "btrfs";
+
extraArgs = ["-f"];
+
+
subvolumes = {
+
"/data" = {
+
mountpoint = "/data";
+
mountOptions = ["compress=zstd" "noatime"];
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
}