Begin the move to the import all, activate by config model

This commit is contained in:
Jimbo 2024-11-04 22:41:38 -05:00
parent 7397b614de
commit 07cb2d67a2
97 changed files with 776 additions and 633 deletions

View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./filesystems
./impermanence
./snapper
];
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
boot.supportedFilesystems = {
ntfs = true;
};
}

View file

@ -0,0 +1,8 @@
{ impermanence, ... }:
{
imports = [
./root
./jimbo
impermanence.nixosModules.impermanence
];
}

View file

@ -0,0 +1,38 @@
{ ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
users.jimbo = {
directories = [
"Downloads"
"Documents"
"Pictures"
"Videos"
"Games"
".snapshots"
".mozilla"
".thunderbird"
".config/blender"
".config/vesktop"
".config/sunshine"
".config/heroic"
".config/obs-studio"
".local/share/nvim/undo"
".local/share/fractal"
".local/share/PrismLauncher"
".local/share/Steam"
{ directory = ".ssh"; mode = "0700"; }
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; }
];
files = [
".zsh_history"
".local/share/clipman.json"
];
};
};
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/etc/secureboot"
"/var/log"
"/var/lib/systemd/coredump"
"/var/lib/nixos"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
./root
./jimbo
];
services.snapper = {
snapshotInterval = "0/6:00:00";
cleanupInterval = "12:00:00";
persistentTimer = true;
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
services.snapper.configs.jimbo = {
SUBVOLUME = "/persist/home/jimbo";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_DAILY = 1;
TIMELINE_LIMIT_WEEKLY = 1;
TIMELINE_LIMIT_MONTHLY = 0;
TIMELINE_LIMIT_YEARLY = 0;
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
services.snapper.configs.root = {
SUBVOLUME = "/persist";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_DAILY = 1;
TIMELINE_LIMIT_WEEKLY = 0;
TIMELINE_LIMIT_MONTHLY = 0;
TIMELINE_LIMIT_YEARLY = 0;
};
}