created disko config for defiant
This commit is contained in:
parent
764f7f57cb
commit
c3a19fb6f9
|
@ -32,7 +32,10 @@
|
|||
|
||||
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.
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
@ -46,6 +49,9 @@
|
|||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver.desktopManager.xterm.enable = false;
|
||||
|
||||
# Get rid of xTerm
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# disable computer sleeping
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
|
|
|
@ -33,7 +33,32 @@ let
|
|||
size = "100%";
|
||||
content = {
|
||||
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_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 = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
mode = {
|
||||
topology = {
|
||||
|
@ -73,7 +98,7 @@ in {
|
|||
options = {
|
||||
ashift = "12";
|
||||
};
|
||||
|
||||
|
||||
rootFsOptions = {
|
||||
encryption = "on";
|
||||
keyformat = "hex";
|
||||
|
@ -83,19 +108,18 @@ in {
|
|||
acltype = "posixacl";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
|
||||
mountpoint = "/";
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
|
||||
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"nix" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"home" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/home";
|
||||
mountpoint = "/mnt/home";
|
||||
options = {
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue