From e225e2e704634fc117f811a5384f482e6437d9e8 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 2 Jan 2023 07:45:05 +0000 Subject: [PATCH] modules/packages: directly set impermanence.home-dirs instead of working through home-manager --- modules/home-manager/default.nix | 7 +++---- modules/packages.nix | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index e4e4dd6d6..2bccfd4de 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -9,10 +9,9 @@ with lib; let cfg = config.sane.home-manager; - # extract package from `sane.packages.enabledUserPkgs` + # extract `pkg` from `sane.packages.enabledUserPkgs` pkg-list = pkgspec: builtins.map (e: e.pkg) pkgspec; - # extract `dir` from `sane.packages.enabledUserPkgs` - dir-list = pkgspec: builtins.concatLists (builtins.map (e: e.dir) pkgspec); + # extract `private` from `sane.packages.enabledUserPkgs` private-list = pkgspec: builtins.concatLists (builtins.map (e: e.private) pkgspec); feeds = import ./feeds.nix { inherit lib; }; in @@ -61,7 +60,7 @@ in "Music" "Pictures" "Videos" - ] ++ (dir-list config.sane.packages.enabledUserPkgs); + ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/modules/packages.nix b/modules/packages.nix index 74a3f0787..0731de20c 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -307,6 +307,7 @@ in config = { environment.systemPackages = mkIf cfg.enableSystemPkgs systemPkgs; + sane.impermanence.home-dirs = concatLists (map (p: p.dir) cfg.enabledUserPkgs); # XXX: this might not be necessary. try removing this and cacert.unbundled? environment.etc."ssl/certs".source = mkIf cfg.enableSystemPkgs "${pkgs.cacert.unbundled}/etc/ssl/certs/*"; };