1
Fork 0

More zfs setup

This commit is contained in:
Matei Adriel 2023-07-17 18:40:39 +02:00
parent 2ef4253adc
commit 1a76be6710
No known key found for this signature in database
4 changed files with 37 additions and 13 deletions

View file

@ -162,6 +162,12 @@
hostname = "euporie";
user = "guest";
};
lapetus = nixos {
system = "x86_64-linux";
hostname = "lapetus";
user = "adrielus";
};
};
# }}}
# {{{ Home manager
@ -187,6 +193,10 @@
system = "x86_64-linux";
hostname = "euporie";
};
"adrielus@lapetus" = mkHomeConfig {
system = "x86_64-linux";
hostname = "lapetus";
};
};
# }}}
};

View file

@ -7,9 +7,8 @@
inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption
];
satellite = {
# Set up my custom imperanence wrapper
persistence = {
satellite.persistence = {
enable = true;
# Actual data/media (eg: projects, images, videos, etc)
@ -22,5 +21,4 @@
# App state which I should be able to delete at any point
at.cache.path = "/persist/local/cache";
};
};
}

View file

@ -1,4 +1,4 @@
{
{ config, ... }: {
imports = [
../common/global
../common/users/adrielus.nix
@ -14,6 +14,20 @@
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
# Configure ZFS
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [ "zroot" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
# We use non-legacy mountpoints
# See [this wiki link](https://nixos.wiki/wiki/ZFS)
# systemd.services.zfs-mount.enable = false;
# Roll back to blank snapshot on boot
# boot.initrd.postDeviceCommands = lib.mkAfter ''
# zfs rollback -r zroot@blank
# '';
# Boot
boot.loader.grub = {
enable = true;

View file

@ -39,10 +39,12 @@
zpool = {
zroot = {
type = "zpool";
postCreateHook = ''
zfs snapshot zroot@blank
zfs set keylocation="prompt" "zroot";
'';
rootFsOptions = {
compression = "lz4";
"com.sun:auto-snapshot" = "false";