mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
samhain: impermanence
This commit is contained in:
parent
fe28364731
commit
160d4d2b6c
7 changed files with 76 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, kw, ... }: with lib; {
|
||||
config = {
|
||||
deploy.targets.personal = {
|
||||
deploy.targets.samhain = {
|
||||
tf = {
|
||||
resources.samhain = {
|
||||
provider = "null";
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ in
|
|||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rpool/safe/root";
|
||||
device = "rpool/ephemeral/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
"/nix" = {
|
||||
|
|
@ -38,9 +38,19 @@ in
|
|||
fsType = "zfs";
|
||||
};
|
||||
"/home" = {
|
||||
device = "rpool/safe/home";
|
||||
device = "rpool/ephemeral/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
"/persist/root" = {
|
||||
device = "rpool/persist/root";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/persist/home" = {
|
||||
device = "rpool/persist/home";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/AED6-D0D1";
|
||||
fsType = "vfat";
|
||||
|
|
@ -51,6 +61,54 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
boot.initrd.postDeviceCommands = mkIf (config.fileSystems."/".fsType == "zfs") (mkAfter ''
|
||||
zfs rollback -r ${config.fileSystems."/".device}@blank
|
||||
zfs rollback -r ${config.fileSystems."/home".device}@blank
|
||||
'');
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
environment.persistence."/persist/root" = {
|
||||
directories = [
|
||||
"/var/log"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/acme"
|
||||
"/var/lib/yggdrasil"
|
||||
"/var/lib/kat/secrets"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/nix/id_rsa"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.kat = {
|
||||
home.persistence."/persist/home" = {
|
||||
allowOther = true;
|
||||
directories = [
|
||||
".local/share/weechat"
|
||||
".local/share/Mumble"
|
||||
".config/Mumble"
|
||||
".password-store"
|
||||
".gnupg"
|
||||
".mozilla"
|
||||
"docs"
|
||||
"media"
|
||||
"mail"
|
||||
"projects"
|
||||
"shared"
|
||||
];
|
||||
files = [
|
||||
".zsh_history"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/89831a0f-93e6-4d30-85e4-09061259f140"; }
|
||||
{ device = "/dev/disk/by-uuid/8f944315-fe1c-4095-90ce-50af03dd5e3f"; }
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
imports = [
|
||||
(import (sources.arcexprs + "/modules")).home-manager
|
||||
(import (sources.katexprs + "/modules")).home
|
||||
(import (sources.impermanence + "/home-manager.nix"))
|
||||
./vim.nix
|
||||
./fvwm.nix
|
||||
./deploy.nix
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
[
|
||||
(import (sources.arcexprs + "/modules")).nixos
|
||||
(import (sources.katexprs + "/modules")).nixos
|
||||
(import (sources.impermanence + "/nixos.nix"))
|
||||
./deploy.nix
|
||||
./dyndns.nix
|
||||
./secrets.nix
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
deploy.targets.personal = {
|
||||
nodeNames = [ "samhain" "yule" ];
|
||||
nodeNames = [ "yule" ];
|
||||
tf = { config, ... }: {
|
||||
dns.records.ygg_grimoire = {
|
||||
tld = "kittywit.ch.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue