created disko config for defiant
This commit is contained in:
parent
1ddce31f00
commit
f7248ab781
|
@ -32,7 +32,10 @@
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
networking.hostId = "c8985fc5"; # TODO: populate this when I get home
|
boot.zfs.extraPools = [ "zpool" ];
|
||||||
|
|
||||||
|
# this might need to match the hostId of the installation medium? `head -c 8 /etc/machine-id` NOPE
|
||||||
|
networking.hostId = "c51763d6";
|
||||||
networking.hostName = "defiant"; # Define your hostname.
|
networking.hostName = "defiant"; # Define your hostname.
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
@ -46,6 +49,9 @@
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
services.xserver.desktopManager.xterm.enable = false;
|
services.xserver.desktopManager.xterm.enable = false;
|
||||||
|
|
||||||
|
# Get rid of xTerm
|
||||||
|
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||||
|
|
||||||
# disable computer sleeping
|
# disable computer sleeping
|
||||||
systemd.targets.sleep.enable = false;
|
systemd.targets.sleep.enable = false;
|
||||||
systemd.targets.suspend.enable = false;
|
systemd.targets.suspend.enable = false;
|
||||||
|
|
|
@ -33,7 +33,32 @@ let
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "zfs";
|
type = "zfs";
|
||||||
pool = "zpool";
|
pool = "zroot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cacheDisk = devicePath: swapSize: {
|
||||||
|
type = "disk";
|
||||||
|
device = devicePath;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
encryptedSwap = {
|
||||||
|
size = swapSize;
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
randomEncryption = true;
|
||||||
|
discardPolicy = "both";
|
||||||
|
resumeDevice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
zfs = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = "zroot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -48,10 +73,10 @@ in {
|
||||||
hd_13_tb_b = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXWSC";
|
hd_13_tb_b = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXWSC";
|
||||||
hd_13_tb_c = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTD10EH";
|
hd_13_tb_c = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTD10EH";
|
||||||
|
|
||||||
# ssd_2_tb_a = zfsDisk "/dev/disk/by-id/XXX";
|
# ssd_2_tb_a = cacheDisk "64G" "/dev/disk/by-id/XXX";
|
||||||
};
|
};
|
||||||
zpool = {
|
zpool = {
|
||||||
zpool = {
|
zroot = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = {
|
mode = {
|
||||||
topology = {
|
topology = {
|
||||||
|
@ -84,18 +109,17 @@ in {
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
};
|
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
|
||||||
|
|
||||||
|
datasets = {
|
||||||
"nix" = {
|
"nix" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
"home" = {
|
"home" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/home";
|
mountpoint = "/mnt/home";
|
||||||
options = {
|
options = {
|
||||||
"com.sun:auto-snapshot" = "true";
|
"com.sun:auto-snapshot" = "true";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue