fix: use systemd tmpfiles instead of home manager for symlinks

This commit is contained in:
uku 2025-03-03 09:28:33 +01:00
parent b7d3507b94
commit b13c022ea4
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
4 changed files with 36 additions and 60 deletions

View file

@ -1,16 +1,8 @@
# wee oo wee oo warning !!! this is a home manager module!!! destined to be put in hm's import, not nixos' !!!!
{ pkgs, ... }:
{
config,
pkgs,
...
}:
let
inherit (config.lib.file) mkOutOfStoreSymlink;
in
{
home.file = {
".jdks/temurin-21".source = mkOutOfStoreSymlink pkgs.temurin-bin-21;
".jdks/temurin-17".source = mkOutOfStoreSymlink pkgs.temurin-bin-17;
".jdks/temurin-8".source = mkOutOfStoreSymlink pkgs.temurin-bin-8;
};
systemd.tmpfiles.rules = [
"L /opt/temurin-21 - - - - ${pkgs.temurin-bin-21}"
"L /opt/temurin-17 - - - - ${pkgs.temurin-bin-17}"
"L /opt/temurin-8 - - - - ${pkgs.temurin-bin-8}"
];
}