summaryrefslogtreecommitdiff
path: root/hosts/toaster/zfs.nix
diff options
context:
space:
mode:
authorGrigory Shipunov2023-01-09 23:07:46 +0100
committerGrigory Shipunov2023-01-09 23:07:46 +0100
commitf690251f1344e65c1f40492b09f355b0b3b00d6a (patch)
tree5eebf9c279a948feb1794e931fa5fc617704efaf /hosts/toaster/zfs.nix
parentd3015fdbdae7c95a7425c5ab50b101c4d4a14cba (diff)
toaster: basic config, nixpkgs-fmt
Diffstat (limited to 'hosts/toaster/zfs.nix')
-rw-r--r--hosts/toaster/zfs.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/hosts/toaster/zfs.nix b/hosts/toaster/zfs.nix
new file mode 100644
index 0000000..a7e9d7a
--- /dev/null
+++ b/hosts/toaster/zfs.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, ... }: {
+ services.fstrim.enable = true;
+ services.zfs = {
+ autoSnapshot.enable = true;
+ trim.enable = true;
+ autoScrub = {
+ enable = true;
+ pools = [ "toasterpool" ];
+ };
+ };
+ networking.hostId = "dca22577";
+ boot = {
+ kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
+ supportedFilesystems = [ "zfs" ];
+ kernelParams = [ "nohibernate" ];
+ plymouth.enable = false;
+ tmpOnTmpfs = true;
+ };
+}