Archived
fix syntax
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
# ../../modules/nix/enable-ip-forwarding.nix
|
||||
../../modules/beszel/enable-agent.nix
|
||||
../../modules/services/enable-rpcbind.nix
|
||||
../../modules/services/zfs/enable-service.nix
|
||||
../../modules/services/zfs/auto-mount-volumes.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -23,9 +25,9 @@
|
||||
networking.hostId = "6689f93e";
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
boot.zfs.package = pkgs.zfs_unstable;
|
||||
# boot.supportedFilesystems = [ "zfs" ];
|
||||
# boot.zfs.forceImportRoot = false;
|
||||
# boot.zfs.package = pkgs.zfs_unstable;
|
||||
|
||||
services.beszel.agent.environment = {
|
||||
#DOCKER_HOST = "tcp://docker-socket-proxy:2375";
|
||||
@@ -41,23 +43,23 @@ TOKEN = "48e71783-35df-4ea0-a8c2-05bc5e020d2e";
|
||||
#system.userActivationScripts.createSetupSymlink.text = ''
|
||||
# ln -sf /mnt/docker-persistent-data/setup /home/nixos/setup
|
||||
#'';
|
||||
boot.postBootCommands = ''
|
||||
echo "=== STARTING ZPOOL IMPORT ==="
|
||||
${pkgs.zfs_unstable}/bin/zpool import -a -N -d /dev/disk/by-path
|
||||
${pkgs.zfs_unstable}/bin/zpool status
|
||||
${pkgs.zfs_unstable}/bin/zfs mount -a
|
||||
${pkgs.zfs_unstable}/bin/zfs list
|
||||
echo "=== ZPOOL IMPORT COMPLETE ==="
|
||||
'';
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoSnapshot.enable = true;
|
||||
trim.enable = true;
|
||||
};
|
||||
# boot.postBootCommands = ''
|
||||
# echo "=== STARTING ZPOOL IMPORT ==="
|
||||
# ${pkgs.zfs_unstable}/bin/zpool import -a -N -d /dev/disk/by-path
|
||||
# ${pkgs.zfs_unstable}/bin/zpool status
|
||||
# ${pkgs.zfs_unstable}/bin/zfs mount -a
|
||||
# ${pkgs.zfs_unstable}/bin/zfs list
|
||||
# echo "=== ZPOOL IMPORT COMPLETE ==="
|
||||
# '';
|
||||
# services.zfs = {
|
||||
# autoScrub.enable = true;
|
||||
# autoSnapshot.enable = true;
|
||||
# trim.enable = true;
|
||||
# };
|
||||
|
||||
systemd.services.zfs-import-cache.enable = true;
|
||||
systemd.services.zfs-mount.enable = true;
|
||||
boot.zfs.devNodes = "/dev/disk/by-id";
|
||||
# systemd.services.zfs-import-cache.enable = true;
|
||||
# systemd.services.zfs-mount.enable = true;
|
||||
# boot.zfs.devNodes = "/dev/disk/by-id";
|
||||
|
||||
systemd.services.nfs-server = {
|
||||
after = [ "zfs-mount.service" ];
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.postBootCommands = ''
|
||||
echo "=== STARTING ZPOOL IMPORT ==="
|
||||
${pkgs.zfs_unstable}/bin/zpool import -a -N -d /dev/disk/by-path
|
||||
${pkgs.zfs_unstable}/bin/zpool status
|
||||
${pkgs.zfs_unstable}/bin/zfs mount -a
|
||||
${pkgs.zfs_unstable}/bin/zfs list
|
||||
echo "=== ZPOOL IMPORT COMPLETE ==="
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
boot.zfs.package = pkgs.zfs_unstable;
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoSnapshot.enable = true;
|
||||
trim.enable = true;
|
||||
};
|
||||
|
||||
systemd.services.zfs-import-cache.enable = true;
|
||||
systemd.services.zfs-mount.enable = true;
|
||||
boot.zfs.devNodes = "/dev/disk/by-id";
|
||||
}
|
||||
Reference in New Issue
Block a user