More zfs setup
This commit is contained in:
parent
2ef4253adc
commit
1a76be6710
10
flake.nix
10
flake.nix
|
@ -162,6 +162,12 @@
|
||||||
hostname = "euporie";
|
hostname = "euporie";
|
||||||
user = "guest";
|
user = "guest";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lapetus = nixos {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostname = "lapetus";
|
||||||
|
user = "adrielus";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Home manager
|
# {{{ Home manager
|
||||||
|
@ -187,6 +193,10 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "euporie";
|
hostname = "euporie";
|
||||||
};
|
};
|
||||||
|
"adrielus@lapetus" = mkHomeConfig {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostname = "lapetus";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,9 +7,8 @@
|
||||||
inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption
|
inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption
|
||||||
];
|
];
|
||||||
|
|
||||||
satellite = {
|
|
||||||
# Set up my custom imperanence wrapper
|
# Set up my custom imperanence wrapper
|
||||||
persistence = {
|
satellite.persistence = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Actual data/media (eg: projects, images, videos, etc)
|
# Actual data/media (eg: projects, images, videos, etc)
|
||||||
|
@ -22,5 +21,4 @@
|
||||||
# App state which I should be able to delete at any point
|
# App state which I should be able to delete at any point
|
||||||
at.cache.path = "/persist/local/cache";
|
at.cache.path = "/persist/local/cache";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{ config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../common/global
|
../common/global
|
||||||
../common/users/adrielus.nix
|
../common/users/adrielus.nix
|
||||||
|
@ -14,6 +14,20 @@
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = "22.11";
|
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
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -39,10 +39,12 @@
|
||||||
zpool = {
|
zpool = {
|
||||||
zroot = {
|
zroot = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
|
|
||||||
postCreateHook = ''
|
postCreateHook = ''
|
||||||
zfs snapshot zroot@blank
|
zfs snapshot zroot@blank
|
||||||
zfs set keylocation="prompt" "zroot";
|
zfs set keylocation="prompt" "zroot";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
compression = "lz4";
|
compression = "lz4";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
|
|
Loading…
Reference in a new issue