Skip to content

Commit

Permalink
Add support for zfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiyq Widianto committed Sep 18, 2020
1 parent 47665df commit c4b28a1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/nix-unstable.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }: {

nixpkgs.config.allowUnfree = true;
nix = {
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};

}
22 changes: 22 additions & 0 deletions modules/uefi-zfs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ config, lib, pkgs, inputs, ... }: {

# UEFI boot
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
editor = false;
};
timeout = lib.mkDefault 1;
};
boot.tmpOnTmpfs = true;

# Add ZFS support.
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.requestEncryptionCredentials = true;

# ZFS services
services.zfs.autoSnapshot.enable = true;
services.zfs.autoScrub.enable = true;

}

0 comments on commit c4b28a1

Please sign in to comment.