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