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 = {
|
||||
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 = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"defaults"
|
||||
"size=4G"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
|
||||
"/nix".neededForBoot = true;
|
||||
"/persist".neededForBoot = true;
|
||||
|
||||
"/storage" = {
|
||||
device = "/dev/disk/by-label/STORAGE";
|
||||
fsType = "ext4";
|
||||
@@ -97,8 +96,6 @@
|
||||
"d /shares/storage-backup 0775 ${primaryUser} users -"
|
||||
];
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware = {
|
||||
|
||||
Reference in New Issue
Block a user