mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 17:54:08 -05:00
Added impermenence module and set Incarceron to be imperm so we can test
this
This commit is contained in:
parent
0f565bed7d
commit
0fbc69679e
5 changed files with 69 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ in {
|
|||
imports = lib.flatten [
|
||||
inputs.home-manager.${platformModules}.home-manager
|
||||
inputs.sops-nix.${platformModules}.sops
|
||||
inputs.impermanence.${platformModules}.impermanence
|
||||
|
||||
(map lib.custom.relativeToRoot [
|
||||
"hosts/common/core/${platform}.nix"
|
||||
|
|
|
|||
50
hosts/common/core/impermanence.nix
Normal file
50
hosts/common/core/impermanence.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.hostSpec.isImpermanent {
|
||||
environment.persistence.${config.hostSpec.persistFolder} = {
|
||||
enable = true;
|
||||
directories = [
|
||||
"/var/log"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
];
|
||||
users.${config.hostSpec.username} = {
|
||||
directories = [
|
||||
"Downloads"
|
||||
"Music"
|
||||
"Pictures"
|
||||
"Documents"
|
||||
"Videos"
|
||||
"VirtualBox VMs"
|
||||
{
|
||||
directory = ".gnupg";
|
||||
mode = "0700";
|
||||
}
|
||||
{
|
||||
directory = ".ssh";
|
||||
mode = "0700";
|
||||
}
|
||||
{
|
||||
directory = ".nixops";
|
||||
mode = "0700";
|
||||
}
|
||||
{
|
||||
directory = ".local/share/keyrings";
|
||||
mode = "0700";
|
||||
}
|
||||
".local/share/direnv"
|
||||
];
|
||||
files = [
|
||||
".screenrc"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue