Added disko setup for desktop

This commit is contained in:
2026-06-30 00:00:47 +02:00
parent 6668c810d3
commit 649942096f
3 changed files with 80 additions and 13 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
{ ... }:
{ {
imports = [ ./hardware-configuration.nix ]; imports = [
./disko.nix
./hardware-configuration.nix
];
networking = { networking = {
useNetworkd = true; useNetworkd = true;
+68
View File
@@ -0,0 +1,68 @@
{
disko.devices.disk.main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"fmask=0022"
"dmask=0022"
];
extraArgs = [
"-n"
"NIXBOOT"
];
};
};
swap = {
size = "4G";
content = {
type = "swap";
extraArgs = [
"-L"
"NIXSWAP"
];
};
};
nix = {
size = "110G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
mountOptions = [ "defaults" ];
extraArgs = [
"-L"
"NIXSTORE"
];
};
};
persist = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persist";
extraArgs = [
"-L"
"NIXPERSIST"
];
};
};
};
};
};
}
+8 -11
View File
@@ -45,19 +45,18 @@
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXROOT"; device = "none";
fsType = "ext4"; fsType = "tmpfs";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ options = [
"fmask=0022" "defaults"
"dmask=0022" "size=4G"
"mode=755"
]; ];
}; };
"/nix".neededForBoot = true;
"/persist".neededForBoot = true;
"/storage" = { "/storage" = {
device = "/dev/disk/by-label/STORAGE"; device = "/dev/disk/by-label/STORAGE";
fsType = "ext4"; fsType = "ext4";
@@ -97,8 +96,6 @@
"d /shares/storage-backup 0775 ${primaryUser} users -" "d /shares/storage-backup 0775 ${primaryUser} users -"
]; ];
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = { hardware = {