change zfs structure
This commit is contained in:
@@ -91,7 +91,7 @@ in
|
|||||||
|
|
||||||
# Rollback root on reboot
|
# Rollback root on reboot
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||||
zfs rollback -r zpool/local/root@blank
|
zfs rollback -r zroot/root@blank
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networking.hostName = meta.hostname;
|
networking.hostName = meta.hostname;
|
||||||
@@ -108,8 +108,6 @@ in
|
|||||||
networking.nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
networking.nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 22 80 443 ];
|
allowedTCPPorts = [ 22 80 443 ];
|
||||||
@@ -171,6 +169,7 @@ in
|
|||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
curl
|
curl
|
||||||
|
kitty
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -33,31 +33,30 @@
|
|||||||
zpool = {
|
zpool = {
|
||||||
zroot = {
|
zroot = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
options.cachefile = "none";
|
# options.cachefile = "none";
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
# what should I be making a snapshot of here?!!!!
|
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
"local/root" = {
|
"root" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/";
|
options.mountpoint = "/";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/local/root@blank$' || zfs snapshot zroot/local/root@blank";
|
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/root@blank$' || zfs snapshot zroot/root@blank";
|
||||||
};
|
};
|
||||||
"local/nix" = {
|
"nix" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/nix";
|
options.mountpoint = "/nix";
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
"safe/home" = {
|
"home" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/home";
|
options.mountpoint = "/home";
|
||||||
mountpoint = "/home";
|
mountpoint = "/home";
|
||||||
};
|
};
|
||||||
"safe/persist" = {
|
"persist" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/persist";
|
options.mountpoint = "/persist";
|
||||||
mountpoint = "/persist";
|
mountpoint = "/persist";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "nvme" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|||||||
Reference in New Issue
Block a user