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;
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;

View File

@@ -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/*";
};