Use impermanence

This commit is contained in:
Madeleine Sydney
2024-12-12 01:38:47 -07:00
parent 3f846d783a
commit 0350752a50
4 changed files with 136 additions and 84 deletions

View File

@@ -15,6 +15,8 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
impermanence.url = "github:nix-community/impermanence";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@@ -70,6 +72,7 @@ let mkHost = k: v: nixpkgs.lib.nixosSystem {
inputs.self.nixosModules.default
inputs.disko.nixosModules.disko
inputs.impermanence.nixosModules.impermanence
# Directory name should always match host name.
({ ... }: { networking.hostName = k; })
@@ -102,6 +105,15 @@ builtins.mapAttrs mkHost (builtins.readDir ./hosts)
];
sydnix = {
impermanence = {
enable = true;
directories = [
# Warning: Neither /var/lib/nixos nor any of its parents are persisted.
# This means all users/groups without specified uids/gids will have them
# reassigned on reboot.
"/var/lib/nixos"
];
};
users.users = [
"crumb"
];