Added disko setup for desktop
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [
|
||||||
|
./disko.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
|
|||||||
@@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user