chore: Update impermanence

This commit is contained in:
Jan-Bulthuis 2026-02-07 17:01:50 +01:00
parent 7d6482587a
commit 7e9f617965
7 changed files with 107 additions and 52 deletions

79
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1765794845,
"narHash": "sha256-YD5QWlGnusNbZCqR3pxG8tRxx9yUXayLZfAJRWspq2s=",
"lastModified": 1766150702,
"narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"owner": "nix-community",
"repo": "disko",
"rev": "7194cfe5b7a3660726b0fe7296070eaef601cae9",
"rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"type": "github"
},
"original": {
@ -79,11 +79,32 @@
]
},
"locked": {
"lastModified": 1765980955,
"narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=",
"lastModified": 1768598210,
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173",
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"impermanence",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768598210,
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
"type": "github"
},
"original": {
@ -93,12 +114,16 @@
}
},
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"lastModified": 1769548169,
"narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"rev": "7b1d382faf603b6d264f58627330f9faa5cba149",
"type": "github"
},
"original": {
@ -172,11 +197,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1765779637,
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
@ -188,11 +213,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1765687488,
"narHash": "sha256-7YAJ6xgBAQ/Nr+7MI13Tui1ULflgAdKh63m1tfYV7+M=",
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d02bcc33948ca19b0aaa0213fe987ceec1f4ebe1",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
@ -202,6 +227,22 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
@ -210,7 +251,7 @@
"madd": "madd",
"nix-minecraft": "nix-minecraft",
"nix-modpack": "nix-modpack",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"secrets": "secrets",
"sops-nix": "sops-nix"
@ -238,11 +279,11 @@
]
},
"locked": {
"lastModified": 1765836173,
"narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=",
"lastModified": 1768481291,
"narHash": "sha256-NjKtkJraCZEnLHAJxLTI+BfdU//9coAz9p5TqveZwPU=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63",
"rev": "e085e303dfcce21adcb5fec535d65aacb066f101",
"type": "github"
},
"original": {

View File

@ -29,5 +29,10 @@
nix-modpack.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: import ./glue inputs;
outputs =
inputs:
import ./glue {
inherit inputs;
excludeHomeManagerModules = [ "impermanence" ];
};
}

View File

@ -1,4 +1,7 @@
inputs:
{
inputs,
excludeHomeManagerModules ? [ ],
}:
let
flake = inputs.self;
nixpkgs = inputs.nixpkgs;
@ -113,7 +116,9 @@ let
homeProfiles = collectModules "${flake}/profiles/home";
inputHomeModules = lib.map (flake: flake.outputs.homeManagerModules.default) (
lib.filter (flake: lib.hasAttrByPath [ "outputs" "homeManagerModules" "default" ] flake) (
lib.attrValues inputs
lib.attrValues (
lib.attrsets.filterAttrs (name: entry: !(lib.elem name excludeHomeManagerModules)) inputs
)
)
);

View File

@ -2,11 +2,11 @@
with lib;
let
# cfg = config.modules.impermanence;
cfg = config.modules.impermanence;
in
{
options.modules.impermanence = {
# enable = mkEnableOption "Impermanence";
enable = mkEnableOption "Impermanence";
directories = mkOption {
type = types.listOf types.str;
default = [ ];
@ -23,12 +23,12 @@ in
};
};
# config = mkIf cfg.enable {
# home.persistence."/persist/home/${config.home.username}" = {
# enable = true;
# allowOther = true;
# directories = cfg.directories;
# files = cfg.files;
# };
# };
config = mkIf cfg.enable {
home.persistence."/persist/home" = {
enable = true;
hideMounts = true;
directories = cfg.directories;
files = cfg.files;
};
};
}

View File

@ -57,6 +57,9 @@ in
modules.networkmanager.enable = true;
# Impermanence
modules.impermanence.directories = [ "/etc/NetworkManager/system-connections" ];
modules.impermanence.directories = [
"/etc/NetworkManager/system-connections"
"/var/lib/bluetooth"
];
};
}

View File

@ -57,25 +57,25 @@ in
directories = cfg.directories;
files = cfg.files;
};
"/persist/home" = {
enable = true;
hideMounts = true;
users = (
lib.mapAttrs' (
name: value:
let
user = name;
homeDir = "/home/${user}";
impConfig = value.modules.impermanence;
in
lib.nameValuePair user {
home = homeDir;
directories = impConfig.directories;
files = impConfig.files;
}
) config.home-manager.users
);
};
# "/persist/home" = {
# enable = true;
# hideMounts = true;
# users = (
# lib.mapAttrs' (
# name: value:
# let
# user = name;
# homeDir = "/home/${user}";
# impConfig = value.modules.impermanence;
# in
# lib.nameValuePair user {
# home = homeDir;
# directories = impConfig.directories;
# files = impConfig.files;
# }
# ) config.home-manager.users
# );
# };
};
};
}

View File

@ -16,6 +16,7 @@ in
config = mkIf cfg.enable {
modules = {
impermanence.enable = true;
# btop.enable = true;
direnv.enable = true;
fish.enable = true;