mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
disko changes
This commit is contained in:
parent
9c61a38653
commit
3ba8494da1
7 changed files with 256 additions and 255 deletions
|
|
@ -45,7 +45,6 @@
|
||||||
flake-utils,
|
flake-utils,
|
||||||
nvim-flake,
|
nvim-flake,
|
||||||
nixos-generators,
|
nixos-generators,
|
||||||
disko,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -59,7 +58,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
disko.nixosModules.disko
|
|
||||||
(import ./modules inputs)
|
(import ./modules inputs)
|
||||||
(import ./systems/gerg-desktop inputs)
|
(import ./systems/gerg-desktop inputs)
|
||||||
{
|
{
|
||||||
|
|
@ -78,7 +76,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
disko.nixosModules.disko
|
|
||||||
(import ./modules inputs)
|
(import ./modules inputs)
|
||||||
(import ./systems/game-laptop inputs)
|
(import ./systems/game-laptop inputs)
|
||||||
];
|
];
|
||||||
|
|
@ -92,7 +89,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
disko.nixosModules.disko
|
|
||||||
(import ./modules inputs)
|
(import ./modules inputs)
|
||||||
(import ./systems/moms-laptop inputs)
|
(import ./systems/moms-laptop inputs)
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
inputs: {
|
inputs: {
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
settings,
|
settings,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./prime.nix inputs)
|
(import ./prime.nix inputs)
|
||||||
|
(import ./disko.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
disko.devices = import ./disko.nix;
|
|
||||||
|
|
||||||
localModules = {
|
localModules = {
|
||||||
DE.gnome.enable = true;
|
DE.gnome.enable = true;
|
||||||
DM = {
|
DM = {
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,38 @@
|
||||||
_: {
|
{disko, ...}: {
|
||||||
disk.nvme0n1 = {
|
imports = [disko.nixosModules.disko];
|
||||||
device = "/dev/disk/by-id/nvme-WDC_PC_SN530_SDBPNPZ-512G-1006_21311N802456";
|
disko.devices = {
|
||||||
type = "disk";
|
disk.nvme0n1 = {
|
||||||
content = {
|
device = "/dev/disk/by-id/nvme-WDC_PC_SN530_SDBPNPZ-512G-1006_21311N802456";
|
||||||
type = "table";
|
type = "disk";
|
||||||
format = "gpt";
|
content = {
|
||||||
partitions = [
|
type = "table";
|
||||||
{
|
format = "gpt";
|
||||||
name = "ESP";
|
partitions = [
|
||||||
start = "1MiB";
|
{
|
||||||
end = "1GiB";
|
name = "ESP";
|
||||||
bootable = true;
|
start = "1MiB";
|
||||||
content = {
|
end = "1GiB";
|
||||||
type = "filesystem";
|
bootable = true;
|
||||||
format = "vfat";
|
content = {
|
||||||
mountpoint = "/boot";
|
type = "filesystem";
|
||||||
};
|
format = "vfat";
|
||||||
}
|
mountpoint = "/boot";
|
||||||
{
|
};
|
||||||
name = "root";
|
}
|
||||||
start = "1GiB";
|
{
|
||||||
end = "100%";
|
name = "root";
|
||||||
part-type = "primary";
|
start = "1GiB";
|
||||||
bootable = true;
|
end = "100%";
|
||||||
content = {
|
part-type = "primary";
|
||||||
type = "filesystem";
|
bootable = true;
|
||||||
format = "ext4";
|
content = {
|
||||||
mountpoint = "/";
|
type = "filesystem";
|
||||||
};
|
format = "ext4";
|
||||||
}
|
mountpoint = "/";
|
||||||
];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,9 @@ inputs: {
|
||||||
(import ./zfs.nix inputs)
|
(import ./zfs.nix inputs)
|
||||||
(import ./containers inputs)
|
(import ./containers inputs)
|
||||||
(import ./erase-your-darlings.nix inputs)
|
(import ./erase-your-darlings.nix inputs)
|
||||||
|
(import ./disko.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
disko.devices = import ./disko.nix;
|
|
||||||
|
|
||||||
localModules = {
|
localModules = {
|
||||||
X11Programs = {
|
X11Programs = {
|
||||||
sxhkd.enable = true;
|
sxhkd.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,187 +1,190 @@
|
||||||
_: {
|
{disko, ...}: {
|
||||||
disk = {
|
imports = [disko.nixosModules.disko];
|
||||||
nvme0 = {
|
disko.devices = {
|
||||||
type = "disk";
|
disk = {
|
||||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22";
|
nvme0 = {
|
||||||
content = {
|
type = "disk";
|
||||||
type = "table";
|
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22";
|
||||||
format = "gpt";
|
content = {
|
||||||
partitions = [
|
type = "table";
|
||||||
{
|
format = "gpt";
|
||||||
name = "boot";
|
partitions = [
|
||||||
start = "0";
|
{
|
||||||
end = "1M";
|
name = "boot";
|
||||||
part-type = "primary";
|
start = "0";
|
||||||
flags = ["bios_grub"];
|
end = "1M";
|
||||||
}
|
part-type = "primary";
|
||||||
{
|
flags = ["bios_grub"];
|
||||||
name = "ESP";
|
}
|
||||||
start = "1M";
|
{
|
||||||
end = "1G";
|
name = "ESP";
|
||||||
bootable = true;
|
start = "1M";
|
||||||
content = {
|
end = "1G";
|
||||||
type = "filesystem";
|
bootable = true;
|
||||||
format = "vfat";
|
content = {
|
||||||
mountpoint = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22";
|
type = "filesystem";
|
||||||
};
|
format = "vfat";
|
||||||
}
|
mountpoint = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22";
|
||||||
{
|
};
|
||||||
name = "zfsboot";
|
}
|
||||||
start = "1G";
|
{
|
||||||
end = "5G";
|
name = "zfsboot";
|
||||||
content = {
|
start = "1G";
|
||||||
type = "zfs";
|
end = "5G";
|
||||||
pool = "bpool";
|
content = {
|
||||||
};
|
type = "zfs";
|
||||||
}
|
pool = "bpool";
|
||||||
{
|
};
|
||||||
name = "swap";
|
}
|
||||||
start = "5G";
|
{
|
||||||
end = "21G";
|
name = "swap";
|
||||||
content = {
|
start = "5G";
|
||||||
type = "swap";
|
end = "21G";
|
||||||
randomEncryption = true;
|
content = {
|
||||||
};
|
type = "swap";
|
||||||
}
|
randomEncryption = true;
|
||||||
{
|
};
|
||||||
name = "zfsroot";
|
}
|
||||||
start = "21G";
|
{
|
||||||
end = "100%";
|
name = "zfsroot";
|
||||||
content = {
|
start = "21G";
|
||||||
type = "zfs";
|
end = "100%";
|
||||||
pool = "rpool";
|
content = {
|
||||||
};
|
type = "zfs";
|
||||||
}
|
pool = "rpool";
|
||||||
];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nvme1 = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
{
|
||||||
|
name = "BIOS";
|
||||||
|
start = "0";
|
||||||
|
end = "1M";
|
||||||
|
part-type = "primary";
|
||||||
|
flags = ["bios_grub"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ESP";
|
||||||
|
start = "1M";
|
||||||
|
end = "1G";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zfsboot";
|
||||||
|
start = "1G";
|
||||||
|
end = "5G";
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = "bpool";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "swap";
|
||||||
|
start = "5G";
|
||||||
|
end = "21G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
randomEncryption = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zfsroot";
|
||||||
|
start = "21G";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = "rpool";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nvme1 = {
|
zpool = {
|
||||||
type = "disk";
|
rpool = {
|
||||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
|
type = "zpool";
|
||||||
content = {
|
mode = "mirror";
|
||||||
type = "table";
|
rootFsOptions = {
|
||||||
format = "gpt";
|
acltype = "posixacl";
|
||||||
partitions = [
|
compression = "zstd";
|
||||||
{
|
dnodesize = "auto";
|
||||||
name = "BIOS";
|
normalization = "formD";
|
||||||
start = "0";
|
relatime = "on";
|
||||||
end = "1M";
|
xattr = "sa";
|
||||||
part-type = "primary";
|
encryption = "on";
|
||||||
flags = ["bios_grub"];
|
keyformat = "passphrase";
|
||||||
}
|
keylocation = "prompt";
|
||||||
{
|
};
|
||||||
name = "ESP";
|
options = {
|
||||||
start = "1M";
|
ashift = "12";
|
||||||
end = "1G";
|
autotrim = "on";
|
||||||
bootable = true;
|
};
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zfsboot";
|
|
||||||
start = "1G";
|
|
||||||
end = "5G";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "bpool";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "swap";
|
|
||||||
start = "5G";
|
|
||||||
end = "21G";
|
|
||||||
content = {
|
|
||||||
type = "swap";
|
|
||||||
randomEncryption = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zfsroot";
|
|
||||||
start = "21G";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "rpool";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
rpool = {
|
|
||||||
type = "zpool";
|
|
||||||
mode = "mirror";
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
compression = "zstd";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
relatime = "on";
|
|
||||||
xattr = "sa";
|
|
||||||
encryption = "on";
|
|
||||||
keyformat = "passphrase";
|
|
||||||
keylocation = "prompt";
|
|
||||||
};
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
"root" = {
|
"root" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
};
|
};
|
||||||
"nix" = {
|
"nix" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
"var" = {
|
"var" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/var";
|
mountpoint = "/var";
|
||||||
};
|
};
|
||||||
"persist" = {
|
"persist" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/persist";
|
mountpoint = "/persist";
|
||||||
};
|
};
|
||||||
"home" = {
|
"home" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/home";
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
bpool = {
|
||||||
bpool = {
|
type = "zpool";
|
||||||
type = "zpool";
|
mode = "mirror";
|
||||||
mode = "mirror";
|
rootFsOptions = {
|
||||||
rootFsOptions = {
|
acltype = "posixacl";
|
||||||
acltype = "posixacl";
|
compression = "lz4";
|
||||||
compression = "lz4";
|
devices = "off";
|
||||||
devices = "off";
|
normalization = "formD";
|
||||||
normalization = "formD";
|
relatime = "on";
|
||||||
relatime = "on";
|
xattr = "sa";
|
||||||
xattr = "sa";
|
canmount = "off";
|
||||||
canmount = "off";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
compatibility = "grub2";
|
compatibility = "grub2";
|
||||||
ashift = "12";
|
ashift = "12";
|
||||||
autotrim = "on";
|
autotrim = "on";
|
||||||
};
|
};
|
||||||
datasets = {
|
datasets = {
|
||||||
"boot" = {
|
"boot" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "legacy";
|
options.mountpoint = "legacy";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,9 @@ inputs: {
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./printing.nix inputs)
|
(import ./printing.nix inputs)
|
||||||
|
(import ./disko.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
disko.devices = import ./disko.nix;
|
|
||||||
|
|
||||||
localModules = {
|
localModules = {
|
||||||
DM = {
|
DM = {
|
||||||
lightdm.enable = true;
|
lightdm.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,40 @@
|
||||||
_: {
|
{disko, ...}: {
|
||||||
disk.sda = {
|
imports = [disko.nixosModules.disko];
|
||||||
device = "/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_180936803144";
|
disko.devices = {
|
||||||
type = "disk";
|
disk.sda = {
|
||||||
content = {
|
device = "/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_180936803144";
|
||||||
type = "table";
|
type = "disk";
|
||||||
format = "gpt";
|
content = {
|
||||||
partitions = [
|
type = "table";
|
||||||
{
|
format = "gpt";
|
||||||
type = "partition";
|
partitions = [
|
||||||
name = "ESP";
|
{
|
||||||
start = "1MiB";
|
type = "partition";
|
||||||
end = "1GiB";
|
name = "ESP";
|
||||||
bootable = true;
|
start = "1MiB";
|
||||||
content = {
|
end = "1GiB";
|
||||||
type = "filesystem";
|
bootable = true;
|
||||||
format = "vfat";
|
content = {
|
||||||
mountpoint = "/boot";
|
type = "filesystem";
|
||||||
};
|
format = "vfat";
|
||||||
}
|
mountpoint = "/boot";
|
||||||
{
|
};
|
||||||
name = "root";
|
}
|
||||||
type = "partition";
|
{
|
||||||
start = "1GiB";
|
name = "root";
|
||||||
end = "100%";
|
type = "partition";
|
||||||
part-type = "primary";
|
start = "1GiB";
|
||||||
bootable = true;
|
end = "100%";
|
||||||
content = {
|
part-type = "primary";
|
||||||
type = "filesystem";
|
bootable = true;
|
||||||
format = "ext4";
|
content = {
|
||||||
mountpoint = "/";
|
type = "filesystem";
|
||||||
};
|
format = "ext4";
|
||||||
}
|
mountpoint = "/";
|
||||||
];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue