tidied
This commit is contained in:
parent
77a4563fde
commit
19cba43068
2 changed files with 3 additions and 4 deletions
|
|
@ -7,12 +7,11 @@
|
|||
## Selected host modules for import
|
||||
./hardware.nix # hardware configuration
|
||||
./network.nix # network configuration
|
||||
./zfs.nix # zfs configuration
|
||||
|
||||
## Additional core modules to import
|
||||
../../../core/modules/jellyfin.nix # temporary for config purposes
|
||||
../../../core/modules/gaming.nix # didnt work in home-manager :(
|
||||
|
||||
../../../modules/jellyfin.nix # temporary for config purposes
|
||||
../../../modules/gaming.nix # didnt work in home-manager :(
|
||||
../../../modules/zfs.nix # ZFS config
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
## ZFS Support NixOS module
|
||||
|
||||
## temporary location while we figure out how ZFS works,
|
||||
## eventually this will be embedded into the flake in a better way
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
## This 'let' binding creates an attribute set
|
||||
## called "LatestZfsLinux", which we can call as
|
||||
## a package to specify when building our kernel.
|
||||
latestZfsLinux = lib.pipe pkgs.linuxKernel.packages [
|
||||
builtins.attrValues
|
||||
(builtins.filter (
|
||||
kPkgs:
|
||||
(builtins.tryEval kPkgs).success
|
||||
&& kPkgs ? kernel
|
||||
&& kPkgs.kernel.pname == "linux"
|
||||
&& !kPkgs.zfs.meta.broken
|
||||
))
|
||||
(builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)))
|
||||
lib.last
|
||||
];
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
];
|
||||
|
||||
## Enable zfs in kernel and boot
|
||||
boot = {
|
||||
kernelPackages = lib.mkForce latestZfsLinux;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
zfs = {
|
||||
extraPools = [ "orcus" ];
|
||||
forceImportRoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
#fileSystems."/home/serenity/Disks/Orcus" = {
|
||||
#device = "orcus";
|
||||
#fsType = "zfs";
|
||||
#options = [ "users" ];
|
||||
#};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zfs
|
||||
];
|
||||
|
||||
## Enable trim for ZFS SSDs
|
||||
services = {
|
||||
zfs = {
|
||||
## Trim for SSSds with ZFS
|
||||
#trim.enable = true;
|
||||
## Autoscrub data integrity ZFS service,
|
||||
## more to be added soon
|
||||
autoScrub = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostId = "603b0c8b";
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue