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