Export shared ZFS nix-store module
This commit is contained in:
+3
-25
@@ -1,8 +1,5 @@
|
||||
{ config, lib, modulesPath, pkgs, ... }:
|
||||
|
||||
let
|
||||
nixPool = "nixos-zfs-nix";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/virtualisation/amazon-image.nix"
|
||||
@@ -22,28 +19,9 @@ in
|
||||
services.amazon-ssm-agent.enable = true;
|
||||
services.openssh.enable = lib.mkForce false;
|
||||
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.extraPools = [ nixPool ];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "${nixPool}/nix";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
options = [
|
||||
"nofail"
|
||||
"x-systemd.device-timeout=30s"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.sockets.nix-daemon = {
|
||||
after = [ "nix.mount" ];
|
||||
requires = [ "nix.mount" ];
|
||||
};
|
||||
|
||||
systemd.services.nix-daemon = {
|
||||
after = [ "nix.mount" ];
|
||||
requires = [ "nix.mount" ];
|
||||
quixos.modules.zfsNixStore = {
|
||||
enable = true;
|
||||
pool = "nixos-zfs-nix";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
Reference in New Issue
Block a user