os/impermanence: init
This commit is contained in:
parent
3b5390bb6e
commit
e5813bbbd6
3 changed files with 48 additions and 0 deletions
16
flake.lock
generated
16
flake.lock
generated
|
@ -605,6 +605,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"impermanence": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724489415,
|
||||||
|
"narHash": "sha256-ey8vhwY/6XCKoh7fyTn3aIQs7WeYSYtLbYEG87VCzX4=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"rev": "c7f5b394397398c023000cf843986ee2571a1fd7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2683,6 +2698,7 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprland-plugins": "hyprland-plugins",
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
|
"impermanence": "impermanence",
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"neovim-flake": "neovim-flake",
|
"neovim-flake": "neovim-flake",
|
||||||
"nixpak": "nixpak",
|
"nixpak": "nixpak",
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
|
|
||||||
helix.url = "github:helix-editor/helix";
|
helix.url = "github:helix-editor/helix";
|
||||||
|
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
neovim-flake = {
|
neovim-flake = {
|
||||||
url = "github:notashelf/nvf";
|
url = "github:notashelf/nvf";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
30
modules/system/os/impermanence/module.nix
Normal file
30
modules/system/os/impermanence/module.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) optionalString mkIf mkForce;
|
||||||
|
|
||||||
|
cfg = config.modules.system.impermanence;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
];
|
||||||
|
environment.persistence."/persist" = {
|
||||||
|
directories = [
|
||||||
|
"/etc/nixos"
|
||||||
|
"/etc/nix"
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/var/db/sudo"
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/pipewire"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
];
|
||||||
|
|
||||||
|
files = [
|
||||||
|
"/etc/machine-id"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue