mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Fix home manager symlink
This commit is contained in:
parent
f646a62be7
commit
a3940a10ae
@ -1,13 +1,15 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib; {
|
||||
options.elss.nix-index-db-update.enable = mkEnableOption "periodically update the nix-index database";
|
||||
options.elss.nix-index-db-update.enable =
|
||||
mkEnableOption "periodically update the nix-index database";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.elss.nix-index-db-update;
|
||||
nix-index-db-update = pkgs.writeShellScript "nix-index-db-update" ''
|
||||
set -euo pipefail
|
||||
|
||||
filename="index-x86_64-$(${pkgs.coreutils}/bin/uname | ${pkgs.coreutils}/bin/tr A-Z a-z)"
|
||||
cd /var/db/nix-index/
|
||||
${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
|
||||
@ -47,9 +49,9 @@ with lib; {
|
||||
};
|
||||
|
||||
home-manager.users = mapAllUsers (_:
|
||||
{
|
||||
home.file.".cache/nix-index" = "/var/db/nix-index/";
|
||||
}
|
||||
);
|
||||
{ config, ... }: {
|
||||
home.file.".cache/nix-index".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "/var/db/nix-index/";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user