modules/packages: directly set impermanence.home-dirs instead of working through home-manager

This commit is contained in:
2023-01-02 07:45:05 +00:00
parent cf0bf8190e
commit e225e2e704
2 changed files with 4 additions and 4 deletions

View File

@@ -9,10 +9,9 @@
with lib; with lib;
let let
cfg = config.sane.home-manager; 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; pkg-list = pkgspec: builtins.map (e: e.pkg) pkgspec;
# extract `dir` from `sane.packages.enabledUserPkgs` # extract `private` from `sane.packages.enabledUserPkgs`
dir-list = pkgspec: builtins.concatLists (builtins.map (e: e.dir) pkgspec);
private-list = pkgspec: builtins.concatLists (builtins.map (e: e.private) pkgspec); private-list = pkgspec: builtins.concatLists (builtins.map (e: e.private) pkgspec);
feeds = import ./feeds.nix { inherit lib; }; feeds = import ./feeds.nix { inherit lib; };
in in
@@ -61,7 +60,7 @@ in
"Music" "Music"
"Pictures" "Pictures"
"Videos" "Videos"
] ++ (dir-list config.sane.packages.enabledUserPkgs); ];
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View File

@@ -307,6 +307,7 @@ in
config = { config = {
environment.systemPackages = mkIf cfg.enableSystemPkgs systemPkgs; 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? # 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/*"; environment.etc."ssl/certs".source = mkIf cfg.enableSystemPkgs "${pkgs.cacert.unbundled}/etc/ssl/certs/*";
}; };